mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-22 13:40:55 +03:00
Bump muno92/resharper_inspectcode from 1.12.3 to 1.13.0 (#348)
This commit is contained in:
parent
f3330c47cc
commit
5a351cbd97
4 changed files with 29 additions and 38 deletions
|
@ -39,8 +39,7 @@ public sealed class Program
|
|||
private static IHostBuilder CreateHostBuilder(string[] args)
|
||||
{
|
||||
return Host.CreateDefaultBuilder(args)
|
||||
.AddDiscordService(
|
||||
services =>
|
||||
.AddDiscordService(services =>
|
||||
{
|
||||
var configuration = services.GetRequiredService<IConfiguration>();
|
||||
|
||||
|
@ -49,25 +48,22 @@ public sealed class Program
|
|||
"No bot token has been provided. Set the "
|
||||
+ "BOT_TOKEN environment variable to a valid token.");
|
||||
}
|
||||
).ConfigureServices(
|
||||
(_, services) =>
|
||||
).ConfigureServices((_, services) =>
|
||||
{
|
||||
services.Configure<DiscordGatewayClientOptions>(
|
||||
options =>
|
||||
{
|
||||
options.Intents |= GatewayIntents.MessageContents
|
||||
| GatewayIntents.GuildMembers
|
||||
| GatewayIntents.GuildPresences
|
||||
| GatewayIntents.GuildScheduledEvents;
|
||||
});
|
||||
services.Configure<CacheSettings>(
|
||||
cSettings =>
|
||||
{
|
||||
cSettings.SetDefaultAbsoluteExpiration(TimeSpan.FromHours(1));
|
||||
cSettings.SetDefaultSlidingExpiration(TimeSpan.FromMinutes(30));
|
||||
cSettings.SetAbsoluteExpiration<IMessage>(TimeSpan.FromDays(7));
|
||||
cSettings.SetSlidingExpiration<IMessage>(TimeSpan.FromDays(7));
|
||||
});
|
||||
services.Configure<DiscordGatewayClientOptions>(options =>
|
||||
{
|
||||
options.Intents |= GatewayIntents.MessageContents
|
||||
| GatewayIntents.GuildMembers
|
||||
| GatewayIntents.GuildPresences
|
||||
| GatewayIntents.GuildScheduledEvents;
|
||||
});
|
||||
services.Configure<CacheSettings>(cSettings =>
|
||||
{
|
||||
cSettings.SetDefaultAbsoluteExpiration(TimeSpan.FromHours(1));
|
||||
cSettings.SetDefaultSlidingExpiration(TimeSpan.FromMinutes(30));
|
||||
cSettings.SetAbsoluteExpiration<IMessage>(TimeSpan.FromDays(7));
|
||||
cSettings.SetSlidingExpiration<IMessage>(TimeSpan.FromDays(7));
|
||||
});
|
||||
|
||||
services.AddTransient<IConfigurationBuilder, ConfigurationBuilder>()
|
||||
// Init
|
||||
|
@ -87,14 +83,13 @@ public sealed class Program
|
|||
.AddHostedService<ScheduledEventUpdateService>()
|
||||
.AddHostedService<SongUpdateService>();
|
||||
}
|
||||
).ConfigureLogging(
|
||||
c => c.AddConsole()
|
||||
.AddFile("Logs/Octobot-{Date}.log",
|
||||
outputTemplate: "{Timestamp:o} [{Level:u4}] {Message} {NewLine}{Exception}")
|
||||
.AddFilter("System.Net.Http.HttpClient.*.LogicalHandler", LogLevel.Warning)
|
||||
.AddFilter("System.Net.Http.HttpClient.*.ClientHandler", LogLevel.Warning)
|
||||
.AddFilter<SerilogLoggerProvider>("System.Net.Http.HttpClient.*.LogicalHandler", LogLevel.Warning)
|
||||
.AddFilter<SerilogLoggerProvider>("System.Net.Http.HttpClient.*.ClientHandler", LogLevel.Warning)
|
||||
).ConfigureLogging(c => c.AddConsole()
|
||||
.AddFile("Logs/Octobot-{Date}.log",
|
||||
outputTemplate: "{Timestamp:o} [{Level:u4}] {Message} {NewLine}{Exception}")
|
||||
.AddFilter("System.Net.Http.HttpClient.*.LogicalHandler", LogLevel.Warning)
|
||||
.AddFilter("System.Net.Http.HttpClient.*.ClientHandler", LogLevel.Warning)
|
||||
.AddFilter<SerilogLoggerProvider>("System.Net.Http.HttpClient.*.LogicalHandler", LogLevel.Warning)
|
||||
.AddFilter<SerilogLoggerProvider>("System.Net.Http.HttpClient.*.ClientHandler", LogLevel.Warning)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue