fixed ulong Convert issue
This commit is contained in:
parent
b503e6edeb
commit
c44e66f0d4
|
@ -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());
|
||||
}
|
||||
}
|
|
@ -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}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue