diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/src/NadekoBot/Modules/Administration/Administration.cs index 5f5a7d5d..ee120b2f 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/src/NadekoBot/Modules/Administration/Administration.cs @@ -475,15 +475,9 @@ namespace NadekoBot.Modules.Administration { var channel = (ITextChannel)msg.Channel; await (msg as IUserMessage).DeleteAsync(); - while (count > 0) - { - int limit = (count < 100) ? count : 100; - var enumerable = (await msg.Channel.GetMessagesAsync(limit: limit)); - await msg.Channel.DeleteMessagesAsync(enumerable); - await Task.Delay(1000); // there is a 1 per second per guild ratelimit for deletemessages - if (enumerable.Count < limit) break; - count -= limit; - } + int limit = (count < 100) ? count : 100; + var enumerable = (await msg.Channel.GetMessagesAsync(limit: limit)); + await msg.Channel.DeleteMessagesAsync(enumerable); } //prune @user [x] diff --git a/src/NadekoBot/Modules/Gambling/Commands/DrawCommand.cs b/src/NadekoBot/Modules/Gambling/Commands/DrawCommand.cs index 410d0cd1..1de5650a 100644 --- a/src/NadekoBot/Modules/Gambling/Commands/DrawCommand.cs +++ b/src/NadekoBot/Modules/Gambling/Commands/DrawCommand.cs @@ -63,7 +63,7 @@ namespace NadekoBot.Modules.Gambling [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] - public async Task Shuffle(IUserMessage imsg) + public async Task ShuffleDeck(IUserMessage imsg) { var channel = (ITextChannel)imsg.Channel; diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index 5cc2eb80..aabe19cf 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -208,35 +208,7 @@ namespace NadekoBot.Modules.Music [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] - public Task Mute(IUserMessage umsg) - { - var channel = (ITextChannel)umsg.Channel; - MusicPlayer musicPlayer; - if (!MusicPlayers.TryGetValue(channel.Guild.Id, out musicPlayer)) - return Task.CompletedTask; - if (((IGuildUser)umsg.Author).VoiceChannel != musicPlayer.PlaybackVoiceChannel) - return Task.CompletedTask; - musicPlayer.SetVolume(0); - return Task.CompletedTask; - } - - [NadekoCommand, Usage, Description, Aliases] - [RequireContext(ContextType.Guild)] - public Task Max(IUserMessage umsg) - { - var channel = (ITextChannel)umsg.Channel; - MusicPlayer musicPlayer; - if (!MusicPlayers.TryGetValue(channel.Guild.Id, out musicPlayer)) - return Task.CompletedTask; - if (((IGuildUser)umsg.Author).VoiceChannel != musicPlayer.PlaybackVoiceChannel) - return Task.CompletedTask; - musicPlayer.SetVolume(100); - return Task.CompletedTask; - } - - [NadekoCommand, Usage, Description, Aliases] - [RequireContext(ContextType.Guild)] - public async Task Shuffle(IUserMessage umsg) + public async Task ShufflePlaylist(IUserMessage umsg) { var channel = (ITextChannel)umsg.Channel; MusicPlayer musicPlayer; diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/src/NadekoBot/Modules/Searches/Searches.cs index 47aeb05c..541d0f0d 100644 --- a/src/NadekoBot/Modules/Searches/Searches.cs +++ b/src/NadekoBot/Modules/Searches/Searches.cs @@ -258,7 +258,7 @@ $@"🌍 **Weather for** 【{obj["target"]}】 [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] - public async Task Ud(IUserMessage umsg, [Remainder] string query = null) + public async Task UrbanDict(IUserMessage umsg, [Remainder] string query = null) { var channel = (ITextChannel)umsg.Channel; @@ -404,7 +404,7 @@ $@"🌍 **Weather for** 【{obj["target"]}】 [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] - public async Task Clr(IUserMessage umsg, [Remainder] string color = null) + public async Task Color(IUserMessage umsg, [Remainder] string color = null) { var channel = (ITextChannel)umsg.Channel; diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index f9c3ef7b..c69f030b 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -93,7 +93,7 @@ namespace NadekoBot.Modules.Utility [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] - public async Task DelAllQuotes(IUserMessage umsg, string keyword) + public async Task DelAllQuotes(IUserMessage umsg, [Remainder] string keyword) { var channel = (ITextChannel)umsg.Channel; diff --git a/src/NadekoBot/Modules/Utility/Commands/Remind.cs b/src/NadekoBot/Modules/Utility/Commands/Remind.cs index 67e297b2..c9268ea8 100644 --- a/src/NadekoBot/Modules/Utility/Commands/Remind.cs +++ b/src/NadekoBot/Modules/Utility/Commands/Remind.cs @@ -198,7 +198,7 @@ namespace NadekoBot.Modules.Utility uow.BotConfig.GetOrCreate().RemindMessageFormat = arg.Trim(); await uow.CompleteAsync().ConfigureAwait(false); } - await channel.SendMessageAsync("`New remind message set.`"); + await channel.SendMessageAsync("`New remind template set.`"); } } } diff --git a/src/NadekoBot/Resources/CommandStrings.Designer.cs b/src/NadekoBot/Resources/CommandStrings.Designer.cs index 93a1032b..e99a1739 100644 --- a/src/NadekoBot/Resources/CommandStrings.Designer.cs +++ b/src/NadekoBot/Resources/CommandStrings.Designer.cs @@ -305,27 +305,27 @@ namespace NadekoBot.Resources { /// /// Looks up a localized string similar to ani anime aq. /// - public static string ani_cmd { + public static string anime_cmd { get { - return ResourceManager.GetString("ani_cmd", resourceCulture); + return ResourceManager.GetString("anime_cmd", resourceCulture); } } /// /// Looks up a localized string similar to Queries anilist for an anime and shows the first result.. /// - public static string ani_desc { + public static string anime_desc { get { - return ResourceManager.GetString("ani_desc", resourceCulture); + return ResourceManager.GetString("anime_desc", resourceCulture); } } /// /// Looks up a localized string similar to `~ani aquarion evol`. /// - public static string ani_usage { + public static string anime_usage { get { - return ResourceManager.GetString("ani_usage", resourceCulture); + return ResourceManager.GetString("anime_usage", resourceCulture); } } @@ -807,7 +807,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to `.calcops`. + /// Looks up a localized string similar to `~calcops`. /// public static string calcops_usage { get { @@ -1463,33 +1463,6 @@ namespace NadekoBot.Resources { } } - /// - /// Looks up a localized string similar to clr prune. - /// - public static string clr_cmd { - get { - return ResourceManager.GetString("clr_cmd", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Shows you what color corresponds to that hex.. - /// - public static string clr_desc { - get { - return ResourceManager.GetString("clr_desc", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to `~clr 00ff00`. - /// - public static string clr_usage { - get { - return ResourceManager.GetString("clr_usage", resourceCulture); - } - } - /// /// Looks up a localized string similar to cmdcooldown cmdcd. /// @@ -1517,6 +1490,33 @@ namespace NadekoBot.Resources { } } + /// + /// Looks up a localized string similar to color clr. + /// + public static string color_cmd { + get { + return ResourceManager.GetString("color_cmd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shows you what color corresponds to that hex.. + /// + public static string color_desc { + get { + return ResourceManager.GetString("color_desc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to `~clr 00ff00`. + /// + public static string color_usage { + get { + return ResourceManager.GetString("color_usage", resourceCulture); + } + } + /// /// Looks up a localized string similar to commands cmds. /// @@ -1590,7 +1590,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to . + /// Looks up a localized string similar to `~convertlist`. /// public static string convertlist_usage { get { @@ -1833,7 +1833,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to `.delallq`. + /// Looks up a localized string similar to `.delallq kek`. /// public static string delallquotes_usage { get { @@ -4191,7 +4191,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to mute min. + /// Looks up a localized string similar to mute. /// public static string mute_cmd { get { @@ -4200,7 +4200,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to Sets the music volume to 0%. + /// Looks up a localized string similar to Mutes a mentioned user in a voice channel.. /// public static string mute_desc { get { @@ -4209,7 +4209,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to `!!min`. + /// Looks up a localized string similar to `.mute @Someone`. /// public static string mute_usage { get { @@ -4920,29 +4920,29 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to remindmsg. + /// Looks up a localized string similar to remindtemplate. /// - public static string remindmsg_cmd { + public static string remindtemplate_cmd { get { - return ResourceManager.GetString("remindmsg_cmd", resourceCulture); + return ResourceManager.GetString("remindtemplate_cmd", resourceCulture); } } /// /// Looks up a localized string similar to Sets message for when the remind is triggered. Available placeholders are %user% - user who ran the command, %message% - Message specified in the remind, %target% - target channel of the remind. . /// - public static string remindmsg_desc { + public static string remindtemplate_desc { get { - return ResourceManager.GetString("remindmsg_desc", resourceCulture); + return ResourceManager.GetString("remindtemplate_desc", resourceCulture); } } /// - /// Looks up a localized string similar to `.remindmsg do something else`. + /// Looks up a localized string similar to `.remindtemplate %user%, you gotta do %message%!`. /// - public static string remindmsg_usage { + public static string remindtemplate_usage { get { - return ResourceManager.GetString("remindmsg_usage", resourceCulture); + return ResourceManager.GetString("remindtemplate_usage", resourceCulture); } } @@ -6144,7 +6144,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to Shows a name and a link to every special emoji in the message.. + /// Looks up a localized string similar to Shows a name and a link to every SPECIAL emoji in the message.. /// public static string showemojis_desc { get { @@ -6153,7 +6153,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to `.se A message full of emojis`. + /// Looks up a localized string similar to `.se A message full of SPECIALemojis`. /// public static string showemojis_usage { get { @@ -6191,27 +6191,54 @@ namespace NadekoBot.Resources { /// /// Looks up a localized string similar to shuffle sh. /// - public static string shuffle_cmd { + public static string shuffledeck_cmd { get { - return ResourceManager.GetString("shuffle_cmd", resourceCulture); + return ResourceManager.GetString("shuffledeck_cmd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reshuffles all cards back into the deck.. + /// + public static string shuffledeck_desc { + get { + return ResourceManager.GetString("shuffledeck_desc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to `$sh`. + /// + public static string shuffledeck_usage { + get { + return ResourceManager.GetString("shuffledeck_usage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to shuffle sh. + /// + public static string shuffleplaylist_cmd { + get { + return ResourceManager.GetString("shuffleplaylist_cmd", resourceCulture); } } /// /// Looks up a localized string similar to Shuffles the current playlist.. /// - public static string shuffle_desc { + public static string shuffleplaylist_desc { get { - return ResourceManager.GetString("shuffle_desc", resourceCulture); + return ResourceManager.GetString("shuffleplaylist_desc", resourceCulture); } } /// /// Looks up a localized string similar to `!!sh`. /// - public static string shuffle_usage { + public static string shuffleplaylist_usage { get { - return ResourceManager.GetString("shuffle_usage", resourceCulture); + return ResourceManager.GetString("shuffleplaylist_usage", resourceCulture); } } @@ -6693,7 +6720,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to `~translangs` or `~translangs language`. + /// Looks up a localized string similar to `~translangs`. /// public static string translangs_usage { get { diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx index 5a923c34..34b069bd 100644 --- a/src/NadekoBot/Resources/CommandStrings.resx +++ b/src/NadekoBot/Resources/CommandStrings.resx @@ -613,13 +613,13 @@ `.k "@some Guy" Your behaviour is toxic.` - mute min + mute - Sets the music volume to 0% + Mutes a mentioned user in a voice channel. - `!!min` + `.mute @Someone` unmute @@ -828,14 +828,14 @@ `.remind me 1d5h Do something` or `.remind #general Start now!` - - remindmsg + + remindtemplate - + Sets message for when the remind is triggered. Available placeholders are %user% - user who ran the command, %message% - Message specified in the remind, %target% - target channel of the remind. - - `.remindmsg do something else` + + `.remindtemplate %user%, you gotta do %message%!` serverinfo sinfo @@ -1314,13 +1314,13 @@ `$draw [x]` - + shuffle sh - + Shuffles the current playlist. - + `!!sh` @@ -1942,7 +1942,7 @@ List of the convertable dimensions and currencies. - + `~convertlist` wowjoke @@ -2043,13 +2043,13 @@ `~yt query` - + ani anime aq - + Queries anilist for an anime and shows the first result. - + `~ani aquarion evol` @@ -2232,13 +2232,13 @@ `~wiki query` - - clr prune + + color clr - + Shows you what color corresponds to that hex. - + `~clr 00ff00` @@ -2473,7 +2473,7 @@ List the valid languages for translation. - `~translangs` or `~translangs language` + `~translangs` bind @@ -2524,7 +2524,7 @@ Shows all available operations in .calc command - `.calcops` + `~calcops` calcops @@ -2533,7 +2533,7 @@ Deletes all quotes on a specified keyword. - `.delallq` + `.delallq kek` delallq daq @@ -2614,9 +2614,18 @@ showemojis se - Shows a name and a link to every special emoji in the message. + Shows a name and a link to every SPECIAL emoji in the message. - `.se A message full of emojis` + `.se A message full of SPECIALemojis` + + + shuffle sh + + + Reshuffles all cards back into the deck. + + + `$sh` \ No newline at end of file