Updated Logger and message handler. Updated to latest Discord.Net version
This commit is contained in:
@@ -66,7 +66,9 @@ internal class Boot
|
||||
AlwaysDownloadUsers = true,
|
||||
|
||||
//Disable system clock checkup (for responses at slash commands)
|
||||
UseInteractionSnowflakeDate = false
|
||||
UseInteractionSnowflakeDate = false,
|
||||
|
||||
GatewayIntents = GatewayIntents.All
|
||||
};
|
||||
|
||||
client = new DiscordSocketClient(config);
|
||||
|
||||
@@ -30,6 +30,7 @@ internal class CommandHandler
|
||||
this.client = client;
|
||||
this.commandService = commandService;
|
||||
this.botPrefix = botPrefix;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -76,12 +77,13 @@ internal class CommandHandler
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Message.Author.IsBot) return;
|
||||
if (Message as SocketUserMessage == null)
|
||||
return;
|
||||
|
||||
var message = Message as SocketUserMessage;
|
||||
|
||||
if (message == null)
|
||||
if (message is null)
|
||||
return;
|
||||
|
||||
if (!message.Content.StartsWith(botPrefix))
|
||||
@@ -95,9 +97,6 @@ internal class CommandHandler
|
||||
return;
|
||||
}
|
||||
|
||||
if (message.Author.IsBot)
|
||||
return;
|
||||
|
||||
var context = new SocketCommandContext(client, message);
|
||||
|
||||
await commandService.ExecuteAsync(context, argPos, null);
|
||||
|
||||
Reference in New Issue
Block a user