Changed LogLevel to Verbose.

This commit is contained in:
Brett Hewitson 2021-12-16 21:46:31 +10:00
parent b31052e25b
commit e2e95da737
3 changed files with 12 additions and 12 deletions

View file

@ -62,11 +62,11 @@ namespace ServerManagerTool.DiscordBot
var socketConfig = new DiscordSocketConfig
{
#if DEBUG
//#if DEBUG
LogLevel = LogSeverity.Verbose,
#else
LogLevel = LogSeverity.Info,
#endif
//#else
// LogLevel = LogSeverity.Info,
//#endif
// Tell Discord.Net to cache 1000 messages per channel
MessageCacheSize = 1000,
};
@ -80,11 +80,11 @@ namespace ServerManagerTool.DiscordBot
{
// Force all commands to run async
DefaultRunMode = RunMode.Async,
#if DEBUG
//#if DEBUG
LogLevel = LogSeverity.Verbose,
#else
LogLevel = LogSeverity.Info,
#endif
//#else
// LogLevel = LogSeverity.Info,
//#endif
};
var discordBotWhitelistConfig = new DiscordBotWhitelistConfig

View file

@ -51,13 +51,13 @@ namespace ServerManagerTool.DiscordBot.Services
}
}
// Create the command context
var context = new SocketCommandContext(_discord, msg);
// Check if the message has a valid command prefix
var argPos = 0;
if (msg.HasStringPrefix(_config["DiscordSettings:Prefix"], ref argPos) || msg.HasMentionPrefix(_discord.CurrentUser, ref argPos))
{
// Create the command context
var context = new SocketCommandContext(_discord, msg);
// Execute the command
var result = await _commands.ExecuteAsync(context, argPos, _provider);

View file

@ -31,7 +31,7 @@ namespace ServerManagerTool.DiscordBot.Services
_commands.Log += OnLogAsync;
}
private async Task OnLogAsync(LogMessage message)
internal async Task OnLogAsync(LogMessage message)
{
// Create the log directory if it doesn't exist
if (!Directory.Exists(LogDirectory))