This repository was archived by the owner on Nov 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ namespace TabletBot.Discord.SlashCommands
1010{
1111 public class ModerationSlashCommands : SlashCommandModule
1212 {
13- protected const string DELETE = "delete" ;
14- protected const string KICK_USER = "kick" ;
15- protected const string BAN_USER = "ban" ;
16- protected const string CREATE_EMBED = "embed" ;
13+ private const string DELETE = "delete" ;
14+ private const string KICK_USER = "kick" ;
15+ private const string BAN_USER = "ban" ;
16+ private const string CREATE_EMBED = "embed" ;
1717
1818 protected override IEnumerable < SlashCommand > GetSlashCommands ( )
1919 {
@@ -165,7 +165,7 @@ protected override IEnumerable<SlashCommand> GetSlashCommands()
165165
166166 private async Task Delete ( SocketSlashCommand command )
167167 {
168- var amount = command . GetValue < int > ( "amount" , 1 ) ;
168+ var amount = ( int ) command . GetValue < long > ( "amount" , 1 ) ;
169169
170170 var messages = await command . Channel . GetMessagesAsync ( amount ) . FlattenAsync ( ) ;
171171 await ( command . Channel as ITextChannel ) . DeleteMessagesAsync ( messages ) ;
Original file line number Diff line number Diff line change 55using Discord . Commands ;
66using Discord . WebSocket ;
77using TabletBot . Common ;
8+ using TabletBot . Discord . Commands ;
89
910namespace TabletBot . Discord . Watchers . Commands
1011{
@@ -28,7 +29,7 @@ IEnumerable<Type> commands
2829 _serviceProvider = serviceProvider ;
2930 _discordClient = discordClient ;
3031 _commandService = commandService ;
31- _commands = commands ;
32+ _commands = commands . OfType < ModuleBase < ICommandContext > > ( ) ;
3233 }
3334
3435 private bool _registered ;
You can’t perform that action at this time.
0 commit comments