mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-24 17:34:13 +00:00
Cut down on log message spam
This commit is contained in:
parent
18de4e3b70
commit
d7bb8d5205
2 changed files with 4 additions and 5 deletions
|
@ -81,10 +81,7 @@ public sealed class ShardInstance : IDisposable {
|
|||
private Task Client_Log(LogMessage arg) {
|
||||
// Suppress certain messages
|
||||
if (arg.Message != null) {
|
||||
// These warnings appear often as of Discord.Net v3...
|
||||
if (arg.Message.StartsWith("Unknown Dispatch ") || arg.Message.StartsWith("Unknown Channel")) return Task.CompletedTask;
|
||||
switch (arg.Message) // Connection status messages replaced by ShardManager's output
|
||||
{
|
||||
switch (arg.Message) {
|
||||
case "Connecting":
|
||||
case "Connected":
|
||||
case "Ready":
|
||||
|
|
|
@ -114,7 +114,9 @@ class ShardManager : IDisposable {
|
|||
TotalShards = Config.ShardTotal,
|
||||
LogLevel = LogSeverity.Info,
|
||||
DefaultRetryMode = RetryMode.Retry502 | RetryMode.RetryTimeouts,
|
||||
GatewayIntents = GatewayIntents.Guilds | GatewayIntents.GuildMembers | GatewayIntents.GuildMessages
|
||||
GatewayIntents = GatewayIntents.Guilds | GatewayIntents.GuildMembers | GatewayIntents.GuildMessages,
|
||||
SuppressUnknownDispatchWarnings = true,
|
||||
LogGatewayIntentWarnings = false
|
||||
};
|
||||
var services = new ServiceCollection()
|
||||
.AddSingleton(s => new ShardInstance(this, s, _textCommands))
|
||||
|
|
Loading…
Reference in a new issue