fixed ulong Convert issue

This commit is contained in:
Ole Sziedat 2023-11-23 21:14:53 +01:00
parent b503e6edeb
commit c44e66f0d4
2 changed files with 3 additions and 5 deletions

View file

@ -9,7 +9,6 @@ public class SetupCommand : BaseModule
public SetupCommand(DiscordSocketClient client, ConfigService configService, IServiceScope scope) : base(client, configService, scope)
{ }
[RequireUserPermission(GuildPermission.Administrator)]
public async Task Handler(SocketSlashCommand command)
{
var dsc = Scope.ServiceProvider.GetRequiredService<DiscordBotService>();
@ -71,7 +70,7 @@ public class SetupCommand : BaseModule
public override async Task Init()
{
var command = new SlashCommandBuilder()
var command = new SlashCommandBuilder
{
Name = "setup",
Description = "Setup the bot and Channels",
@ -88,6 +87,6 @@ public class SetupCommand : BaseModule
})
};
await Client.GetGuild((ulong)DiscordConfig.GuildId).CreateApplicationCommandAsync(command.Build());
await Client.GetGuild(Convert.ToUInt64(DiscordConfig.GuildId)).CreateApplicationCommandAsync(command.Build());
}
}

View file

@ -119,8 +119,7 @@ public class DiscordBotService
{ }
catch (Exception ex)
{
Logger.Error($"Module Error '{instance}' \n{ex.Message}");
Logger.Error(ex.InnerException);
Logger.Error($"Module Error '{instance}' \n{ex}");
}
}