From 7181c2a6075e624c535ef54dfd99003a549db174 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Fri, 23 Sep 2016 10:23:54 +0200 Subject: [PATCH] Updated discord.net. More work on permissions --- discord.net | 2 +- .../Attributes/LocalizedDescription.cs | 4 +- .../Modules/Administration/Administration.cs | 52 ++--- .../Commands/AutoAssignRoleCommands.cs | 2 +- .../Commands/CrossServerTextChannel.cs | 4 +- .../Administration/Commands/LogCommand.cs | 10 +- .../Commands/MessageRepeater.cs | 6 +- .../Commands/PlayingRotateCommands.cs | 8 +- .../Commands/RatelimitCommand.cs | 2 +- .../Commands/SelfAssignedRolesCommand.cs | 12 +- .../Commands/ServerGreetCommands.cs | 16 +- .../Commands/VoicePlusTextCommands.cs | 4 +- .../Modules/ClashOfClans/ClashOfClans.cs | 18 +- .../Modules/Gambling/Commands/AnimalRacing.cs | 4 +- .../Gambling/Commands/DiceRollCommand.cs | 12 +- .../Modules/Gambling/Commands/DrawCommand.cs | 4 +- .../Gambling/Commands/FlipCoinCommand.cs | 4 +- src/NadekoBot/Modules/Gambling/Gambling.cs | 14 +- .../Modules/Games/Commands/LeetCommands.cs | 2 +- .../Games/Commands/PlantAndPickCommands.cs | 6 +- .../Modules/Games/Commands/PollCommands.cs | 4 +- .../Games/Commands/SpeedTypingCommands.cs | 4 +- .../Modules/Games/Commands/TriviaCommands.cs | 6 +- src/NadekoBot/Modules/Games/Games.cs | 8 +- src/NadekoBot/Modules/Help/Help.cs | 30 ++- src/NadekoBot/Modules/Music/Music.cs | 56 ++--- src/NadekoBot/Modules/NSFW/NSFW.cs | 16 +- .../Permissions/PermissionExtensions.cs | 16 +- .../Modules/Permissions/Permissions.cs | 217 +++++++++++++++++- src/NadekoBot/Modules/Pokemon/Pokemon.cs | 2 +- .../Searches/Commands/AnimeSearchCommands.cs | 4 +- .../Modules/Searches/Commands/CalcCommand.cs | 4 +- .../Modules/Searches/Commands/JokeCommands.cs | 10 +- .../Modules/Searches/Commands/LoLCommands.cs | 2 +- .../Searches/Commands/MemegenCommands.cs | 4 +- .../Modules/Searches/Commands/OsuCommands.cs | 6 +- .../Commands/PokemonSearchCommands.cs | 4 +- .../Commands/StreamNotificationCommands.cs | 12 +- .../Searches/Commands/UnitConversion.cs | 6 +- src/NadekoBot/Modules/Searches/Searches.cs | 40 ++-- .../Modules/Translator/Translator.cs | 4 +- .../Modules/Utility/Commands/InfoCommands.cs | 6 +- .../Modules/Utility/Commands/QuoteCommands.cs | 8 +- .../Modules/Utility/Commands/Remind.cs | 2 +- src/NadekoBot/Modules/Utility/Utility.cs | 18 +- .../Resources/CommandStrings.Designer.cs | 4 +- src/NadekoBot/Resources/CommandStrings.resx | 4 +- .../Services/Database/Models/Permission.cs | 4 +- 48 files changed, 460 insertions(+), 227 deletions(-) diff --git a/discord.net b/discord.net index b51408de..72131e69 160000 --- a/discord.net +++ b/discord.net @@ -1 +1 @@ -Subproject commit b51408def863ee5f4273478efa65eb50e4008487 +Subproject commit 72131e69f8ab39c4ed3c5002ed602c72ae83b506 diff --git a/src/NadekoBot/Attributes/LocalizedDescription.cs b/src/NadekoBot/Attributes/LocalizedDescription.cs index 470b6113..e05ec7c0 100644 --- a/src/NadekoBot/Attributes/LocalizedDescription.cs +++ b/src/NadekoBot/Attributes/LocalizedDescription.cs @@ -4,9 +4,9 @@ using System.Runtime.CompilerServices; namespace NadekoBot.Attributes { - public class LocalizedDescriptionAttribute : DescriptionAttribute + public class LocalizedRemarksAttribute : RemarksAttribute { - public LocalizedDescriptionAttribute([CallerMemberName] string memberName="") : base(Localization.LoadCommandString(memberName.ToLowerInvariant()+"_desc")) + public LocalizedRemarksAttribute([CallerMemberName] string memberName="") : base(Localization.LoadCommandString(memberName.ToLowerInvariant()+"_desc")) { } diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/src/NadekoBot/Modules/Administration/Administration.cs index 2d62e236..623ec387 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/src/NadekoBot/Modules/Administration/Administration.cs @@ -60,7 +60,7 @@ namespace NadekoBot.Modules.Administration // Environment.Exit(0); //} - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.Administrator)] public async Task Delmsgoncmd(IUserMessage umsg) @@ -80,7 +80,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("ā—`Stopped automatic deletion of successfull command invokations.`"); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageRoles)] public async Task Setrole(IUserMessage umsg, IGuildUser usr, [Remainder] IRole role) @@ -98,7 +98,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageRoles)] public async Task Removerole(IUserMessage umsg, IGuildUser usr, [Remainder] IRole role) @@ -115,7 +115,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageRoles)] public async Task RenameRole(IUserMessage umsg, IRole roleToEdit, string newname) @@ -137,7 +137,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageRoles)] public async Task RemoveAllRoles(IUserMessage umsg, [Remainder] IGuildUser user) @@ -155,7 +155,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageRoles)] public async Task CreateRole(IUserMessage umsg, [Remainder] string roleName = null) @@ -176,7 +176,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageRoles)] public async Task RoleColor(IUserMessage umsg, params string[] args) @@ -214,7 +214,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.BanMembers)] public async Task Ban(IUserMessage umsg, IGuildUser user) @@ -241,7 +241,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.BanMembers)] public async Task Softban(IUserMessage umsg, IGuildUser user, [Remainder] string msg = null) @@ -267,7 +267,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Kick(IUserMessage umsg, IGuildUser user, [Remainder] string msg = null) { @@ -295,7 +295,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.MuteMembers)] public async Task Mute(IUserMessage umsg, params IGuildUser[] users) @@ -318,7 +318,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.MuteMembers)] public async Task Unmute(IUserMessage umsg, params IGuildUser[] users) @@ -341,7 +341,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.DeafenMembers)] public async Task Deafen(IUserMessage umsg, params IGuildUser[] users) @@ -364,7 +364,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.DeafenMembers)] public async Task UnDeafen(IUserMessage umsg, params IGuildUser[] users) @@ -387,7 +387,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageChannels)] public async Task DelVoiChanl(IUserMessage umsg, [Remainder] IVoiceChannel voiceChannel) @@ -396,7 +396,7 @@ namespace NadekoBot.Modules.Administration await umsg.Channel.SendMessageAsync($"Removed channel **{voiceChannel.Name}**.").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageChannels)] public async Task CreatVoiChanl(IUserMessage umsg, [Remainder] string channelName) @@ -406,7 +406,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync($"Created voice channel **{ch.Name}**, id `{ch.Id}`.").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageChannels)] public async Task DelTxtChanl(IUserMessage umsg, [Remainder] ITextChannel channel) @@ -415,7 +415,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync($"Removed text channel **{channel.Name}**, id `{channel.Id}`.").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageChannels)] public async Task CreaTxtChanl(IUserMessage umsg, [Remainder] string channelName) @@ -425,7 +425,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync($"Added text channel **{txtCh.Name}**, id `{txtCh.Id}`.").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageChannels)] public async Task SetTopic(IUserMessage umsg, [Remainder] string topic = null) @@ -436,7 +436,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync(":ok: **New channel topic set.**").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageChannels)] public async Task SetChanlName(IUserMessage umsg, [Remainder] string name) @@ -449,7 +449,7 @@ namespace NadekoBot.Modules.Administration //delets her own messages, no perm required - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Prune(IUserMessage umsg) { @@ -462,7 +462,7 @@ namespace NadekoBot.Modules.Administration } // prune x - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(ChannelPermission.ManageMessages)] public async Task Prune(IUserMessage msg, int count) @@ -481,7 +481,7 @@ namespace NadekoBot.Modules.Administration } //prune @user [x] - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Prune(IUserMessage msg, IGuildUser user, int count = 100) { @@ -635,7 +635,7 @@ namespace NadekoBot.Modules.Administration //} - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.MentionEveryone)] public async Task MentionRole(IUserMessage umsg, params IRole[] roles) @@ -660,7 +660,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync(send).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Donators(IUserMessage umsg) { @@ -676,7 +676,7 @@ namespace NadekoBot.Modules.Administration } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Donadd(IUserMessage umsg, IUser donator, int amount) { diff --git a/src/NadekoBot/Modules/Administration/Commands/AutoAssignRoleCommands.cs b/src/NadekoBot/Modules/Administration/Commands/AutoAssignRoleCommands.cs index 1cde1716..b5aedcf4 100644 --- a/src/NadekoBot/Modules/Administration/Commands/AutoAssignRoleCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/AutoAssignRoleCommands.cs @@ -42,7 +42,7 @@ namespace NadekoBot.Modules.Administration }; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageRoles)] public async Task AutoAssignRole(IUserMessage umsg, [Remainder] IRole role = null) diff --git a/src/NadekoBot/Modules/Administration/Commands/CrossServerTextChannel.cs b/src/NadekoBot/Modules/Administration/Commands/CrossServerTextChannel.cs index 36b00e9e..5012a644 100644 --- a/src/NadekoBot/Modules/Administration/Commands/CrossServerTextChannel.cs +++ b/src/NadekoBot/Modules/Administration/Commands/CrossServerTextChannel.cs @@ -70,7 +70,7 @@ namespace NadekoBot.Modules.Administration // } //} - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageGuild)] public async Task Jcsc(IUserMessage imsg, int token) @@ -84,7 +84,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync(":ok:").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageGuild)] public async Task Lcsc(IUserMessage imsg) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 6cff7855..e04b9a46 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -482,7 +482,7 @@ namespace NadekoBot.Modules.Administration return channel; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task LogServer(IUserMessage msg) { @@ -504,7 +504,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("`Logging disabled.`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task LogIgnore(IUserMessage imsg) { @@ -527,7 +527,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync($"`Logging will no longer ignore {channel.Name} ({channel.Id}) channel.`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task LogAdd(IUserMessage msg, [Remainder] string eventName) { @@ -597,7 +597,7 @@ namespace NadekoBot.Modules.Administration // } //} - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task UserPresence(IUserMessage imsg) { @@ -619,7 +619,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync($"`Stopped logging user presence updates.`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task VoicePresence(IUserMessage imsg) { diff --git a/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs b/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs index 57c5fe9a..7902102c 100644 --- a/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs +++ b/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs @@ -73,7 +73,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageMessages)] public async Task RepeatInvoke(IUserMessage imsg) @@ -90,7 +90,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("šŸ”„ " + rep.Repeater.Message).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Repeat(IUserMessage imsg) { @@ -110,7 +110,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("`No message is repeating.`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Repeat(IUserMessage imsg, int minutes, [Remainder] string message) { diff --git a/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs b/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs index 59baf3d4..3476b258 100644 --- a/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs @@ -86,7 +86,7 @@ namespace NadekoBot.Modules.Administration {"%queued%", () => Music.Music.MusicPlayers.Sum(kvp => kvp.Value.Playlist.Count).ToString()} }; - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task RotatePlaying(IUserMessage umsg) { @@ -106,7 +106,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("`Rotating playing status disabled.`"); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task AddPlaying(IUserMessage umsg, [Remainder] string status) { @@ -122,7 +122,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("`Added.`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ListPlaying(IUserMessage umsg) { @@ -144,7 +144,7 @@ namespace NadekoBot.Modules.Administration } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task RemovePlaying(IUserMessage umsg, int index) { diff --git a/src/NadekoBot/Modules/Administration/Commands/RatelimitCommand.cs b/src/NadekoBot/Modules/Administration/Commands/RatelimitCommand.cs index c127c439..fa606adb 100644 --- a/src/NadekoBot/Modules/Administration/Commands/RatelimitCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/RatelimitCommand.cs @@ -84,7 +84,7 @@ namespace NadekoBot.Modules.Administration }; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Slowmode(IUserMessage umsg, int msg = 1, int perSec = 5) { diff --git a/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs b/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs index 8a05ceea..8ecfd242 100644 --- a/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs @@ -19,7 +19,7 @@ namespace NadekoBot.Modules.Administration public class SelfAssignedRolesCommands { - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageRoles)] public async Task Asar(IUserMessage umsg, [Remainder] IRole role) @@ -49,7 +49,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync(msg.ToString()).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageRoles)] public async Task Rsar(IUserMessage umsg, [Remainder] IRole role) @@ -70,7 +70,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync($":ok:**{role.Name}** has been removed from the list of self-assignable roles").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Lsar(IUserMessage umsg) { @@ -105,7 +105,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync(msg.ToString() + "\n\n" + removeMsg.ToString()).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageRoles)] public async Task Tesar(IUserMessage umsg) @@ -124,7 +124,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("Self assigned roles are now " + exl); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Iam(IUserMessage umsg, [Remainder] IRole role) { @@ -182,7 +182,7 @@ namespace NadekoBot.Modules.Administration } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Iamnot(IUserMessage umsg, [Remainder] IRole role) { diff --git a/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs b/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs index 53a5abd5..b462ebd5 100644 --- a/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs @@ -106,7 +106,7 @@ namespace NadekoBot.Modules.Administration return Task.CompletedTask; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageGuild)] public async Task GreetDel(IUserMessage umsg) @@ -128,7 +128,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("`Automatic deletion of greet messages has been disabled.`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageGuild)] public async Task Greet(IUserMessage umsg) @@ -151,7 +151,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("Greet announcements disabled.").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageGuild)] public async Task GreetMsg(IUserMessage umsg, [Remainder] string text) @@ -180,7 +180,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("Enable greet messsages by typing `.greet`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageGuild)] public async Task GreetDm(IUserMessage umsg) @@ -202,7 +202,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("Greet announcements disabled.").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageGuild)] public async Task GreetDmMsg(IUserMessage umsg, [Remainder] string text) @@ -231,7 +231,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("Enable DM greet messsages by typing `.greetdm`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageGuild)] public async Task Bye(IUserMessage umsg) @@ -254,7 +254,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("Bye announcements disabled.").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageGuild)] public async Task ByeMsg(IUserMessage umsg, [Remainder] string text) @@ -283,7 +283,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync("Enable bye messsages by typing `.bye`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageGuild)] public async Task ByeDel(IUserMessage umsg) diff --git a/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs b/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs index 75f4d649..e3a15e49 100644 --- a/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs @@ -97,7 +97,7 @@ namespace NadekoBot.Modules.Administration private string GetChannelName(string voiceName) => channelNameRegex.Replace(voiceName, "").Trim().Replace(" ", "-").TrimTo(90, true) + "-voice"; - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageRoles)] [RequirePermission(GuildPermission.ManageChannels)] @@ -138,7 +138,7 @@ namespace NadekoBot.Modules.Administration await channel.SendMessageAsync(ex.ToString()).ConfigureAwait(false); } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageChannels)] [RequirePermission(GuildPermission.ManageRoles)] diff --git a/src/NadekoBot/Modules/ClashOfClans/ClashOfClans.cs b/src/NadekoBot/Modules/ClashOfClans/ClashOfClans.cs index c7e8e708..04ac67aa 100644 --- a/src/NadekoBot/Modules/ClashOfClans/ClashOfClans.cs +++ b/src/NadekoBot/Modules/ClashOfClans/ClashOfClans.cs @@ -51,7 +51,7 @@ namespace NadekoBot.Modules.ClashOfClans } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task CreateWar(IUserMessage umsg, int size, [Remainder] string enemyClan = null) { @@ -84,7 +84,7 @@ namespace NadekoBot.Modules.ClashOfClans await channel.SendMessageAsync($"ā—šŸ”°**CREATED CLAN WAR AGAINST {cw.ShortPrint()}**").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task StartWar(IUserMessage umsg, [Remainder] string number = null) { @@ -112,7 +112,7 @@ namespace NadekoBot.Modules.ClashOfClans SaveWar(war); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ListWar(IUserMessage umsg, [Remainder] string number = null) { @@ -155,7 +155,7 @@ namespace NadekoBot.Modules.ClashOfClans await channel.SendMessageAsync(warsInfo.Item1[warsInfo.Item2].ToPrettyString()).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Claim(IUserMessage umsg, int number, int baseNumber, [Remainder] string other_name = null) { @@ -183,7 +183,7 @@ namespace NadekoBot.Modules.ClashOfClans } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ClaimFinish1(IUserMessage umsg, int number, int baseNumber, [Remainder] string other_name = null) { @@ -191,7 +191,7 @@ namespace NadekoBot.Modules.ClashOfClans await FinishClaim(umsg, number, baseNumber, other_name, 1); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ClaimFinish2(IUserMessage umsg, int number, int baseNumber, [Remainder] string other_name = null) { @@ -199,7 +199,7 @@ namespace NadekoBot.Modules.ClashOfClans await FinishClaim(umsg, number, baseNumber, other_name, 2); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ClaimFinish(IUserMessage umsg, int number, int baseNumber, [Remainder] string other_name = null) { @@ -207,7 +207,7 @@ namespace NadekoBot.Modules.ClashOfClans await FinishClaim(umsg, number, baseNumber, other_name); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task EndWar(IUserMessage umsg, int number) { @@ -228,7 +228,7 @@ namespace NadekoBot.Modules.ClashOfClans warsInfo.Item1.RemoveAt(warsInfo.Item2); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Unclaim(IUserMessage umsg, int number, [Remainder] string otherName = null) { diff --git a/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs b/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs index 15ea002d..8e34016c 100644 --- a/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs +++ b/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs @@ -24,7 +24,7 @@ namespace NadekoBot.Modules.Gambling } public static ConcurrentDictionary AnimalRaces = new ConcurrentDictionary(); - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Race(IUserMessage umsg) { @@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Gambling await channel.SendMessageAsync("šŸ `Failed starting a race. Another race is probably running.`"); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task JoinRace(IUserMessage umsg, int amount = 0) { diff --git a/src/NadekoBot/Modules/Gambling/Commands/DiceRollCommand.cs b/src/NadekoBot/Modules/Gambling/Commands/DiceRollCommand.cs index 95ab1cf8..10972871 100644 --- a/src/NadekoBot/Modules/Gambling/Commands/DiceRollCommand.cs +++ b/src/NadekoBot/Modules/Gambling/Commands/DiceRollCommand.cs @@ -21,7 +21,7 @@ namespace NadekoBot.Modules.Gambling { private Regex dndRegex { get; } = new Regex(@"(?\d+)d(?\d+)", RegexOptions.Compiled); - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Roll(IUserMessage umsg) { @@ -44,7 +44,7 @@ namespace NadekoBot.Modules.Gambling await channel.SendFileAsync(imageStream, "dice.png", $"{umsg.Author.Mention} rolled " + Format.Code(gen.ToString())).ConfigureAwait(false); } //todo merge into internallDndRoll and internalRoll - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Roll(IUserMessage umsg, string arg) { @@ -74,7 +74,7 @@ namespace NadekoBot.Modules.Gambling } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Roll(IUserMessage umsg, int num) { @@ -128,7 +128,7 @@ namespace NadekoBot.Modules.Gambling await channel.SendFileAsync(ms, "dice.png", $"{umsg.Author.Mention} rolled {values.Count} {(values.Count == 1 ? "die" : "dice")}. Total: **{values.Sum()}** Average: **{(values.Sum() / (1.0f * values.Count)).ToString("N2")}**").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Rolluo(IUserMessage umsg, string arg) { @@ -158,7 +158,7 @@ namespace NadekoBot.Modules.Gambling } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Rolluo(IUserMessage umsg, int num) { @@ -211,7 +211,7 @@ namespace NadekoBot.Modules.Gambling await channel.SendFileAsync(ms, "dice.png", $"{umsg.Author.Mention} rolled {values.Count} {(values.Count == 1 ? "die" : "dice")}. Total: **{values.Sum()}** Average: **{(values.Sum() / (1.0f * values.Count)).ToString("N2")}**").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task NRoll(IUserMessage umsg, [Remainder] string range) { diff --git a/src/NadekoBot/Modules/Gambling/Commands/DrawCommand.cs b/src/NadekoBot/Modules/Gambling/Commands/DrawCommand.cs index e7f36388..9a455ac5 100644 --- a/src/NadekoBot/Modules/Gambling/Commands/DrawCommand.cs +++ b/src/NadekoBot/Modules/Gambling/Commands/DrawCommand.cs @@ -18,7 +18,7 @@ namespace NadekoBot.Modules.Gambling private static readonly ConcurrentDictionary AllDecks = new ConcurrentDictionary(); private const string cardsPath = "data/images/cards"; - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Draw(IUserMessage msg) { @@ -50,7 +50,7 @@ namespace NadekoBot.Modules.Gambling } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Shuffle(IUserMessage imsg) { diff --git a/src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs b/src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs index c1888913..05096884 100644 --- a/src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs +++ b/src/NadekoBot/Modules/Gambling/Commands/FlipCoinCommand.cs @@ -19,7 +19,7 @@ namespace NadekoBot.Modules.Gambling private const string tailsPath = "data/images/coins/tails.png"; public FlipCoinCommands() { } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Flip(IUserMessage imsg, int count = 1) { @@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Gambling await channel.SendFileAsync(imgs.Merge().ToStream(), $"{count} coins.png").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Betflip(IUserMessage umsg, int amount, string guess) { diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/NadekoBot/Modules/Gambling/Gambling.cs index 589441ac..df318cfd 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/NadekoBot/Modules/Gambling/Gambling.cs @@ -33,7 +33,7 @@ namespace NadekoBot.Modules.Gambling } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Raffle(IUserMessage umsg, [Remainder] IRole role = null) { @@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Gambling await channel.SendMessageAsync($"**Raffled user:** {usr.Username} (id: {usr.Id})").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Cash(IUserMessage umsg, [Remainder] IUser user = null) { @@ -65,7 +65,7 @@ namespace NadekoBot.Modules.Gambling await channel.SendMessageAsync($"{user.Username} has {amount} {config.CurrencySign}").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Give(IUserMessage umsg, long amount, [Remainder] IGuildUser receiver) { @@ -83,12 +83,12 @@ namespace NadekoBot.Modules.Gambling } //todo owner only - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public Task Award(IUserMessage umsg, long amount, [Remainder] IGuildUser usr) => Award(umsg, amount, usr.Id); - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Award(IUserMessage umsg, long amount, [Remainder] ulong usrId) { @@ -122,7 +122,7 @@ namespace NadekoBot.Modules.Gambling // await channel.SendMessageAsync($"{umsg.Author.Mention} successfully took {amount} {Gambling.CurrencyName}s from <@{usrId}>!").ConfigureAwait(false); //} - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task BetRoll(IUserMessage umsg, long amount) { @@ -172,7 +172,7 @@ namespace NadekoBot.Modules.Gambling await channel.SendMessageAsync(str).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Leaderboard(IUserMessage umsg) { diff --git a/src/NadekoBot/Modules/Games/Commands/LeetCommands.cs b/src/NadekoBot/Modules/Games/Commands/LeetCommands.cs index 63e4ca54..4f0f85af 100644 --- a/src/NadekoBot/Modules/Games/Commands/LeetCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/LeetCommands.cs @@ -12,7 +12,7 @@ namespace NadekoBot.Modules.Games { public partial class Games { - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Leet(IUserMessage umsg, int level, [Remainder] string text = null) { diff --git a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs index 689aea42..f2474d50 100644 --- a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs @@ -96,7 +96,7 @@ namespace NadekoBot.Modules.Games }); return Task.CompletedTask; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Pick(IUserMessage imsg) { @@ -129,7 +129,7 @@ namespace NadekoBot.Modules.Games }); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Plant(IUserMessage imsg) { @@ -160,7 +160,7 @@ namespace NadekoBot.Modules.Games plantedFlowers.AddOrUpdate(channel.Id, new List() { msg }, (id, old) => { old.Add(msg); return old; }); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageMessages)] public async Task Gencurrency(IUserMessage imsg) diff --git a/src/NadekoBot/Modules/Games/Commands/PollCommands.cs b/src/NadekoBot/Modules/Games/Commands/PollCommands.cs index 711873d3..0f2c31e5 100644 --- a/src/NadekoBot/Modules/Games/Commands/PollCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/PollCommands.cs @@ -14,7 +14,7 @@ namespace NadekoBot.Modules.Games { public static ConcurrentDictionary ActivePolls = new ConcurrentDictionary(); - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Poll(IUserMessage umsg, [Remainder] string arg = null) { @@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Games } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Pollend(IUserMessage umsg) { diff --git a/src/NadekoBot/Modules/Games/Commands/SpeedTypingCommands.cs b/src/NadekoBot/Modules/Games/Commands/SpeedTypingCommands.cs index 7817a61a..b2b05d19 100644 --- a/src/NadekoBot/Modules/Games/Commands/SpeedTypingCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/SpeedTypingCommands.cs @@ -139,7 +139,7 @@ namespace NadekoBot.Modules.Games RunningContests = new ConcurrentDictionary(); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task TypeStart(IUserMessage msg) { @@ -160,7 +160,7 @@ namespace NadekoBot.Modules.Games } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task TypeStop(IUserMessage imsg) { diff --git a/src/NadekoBot/Modules/Games/Commands/TriviaCommands.cs b/src/NadekoBot/Modules/Games/Commands/TriviaCommands.cs index 63a8a820..8556ac00 100644 --- a/src/NadekoBot/Modules/Games/Commands/TriviaCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/TriviaCommands.cs @@ -17,7 +17,7 @@ namespace NadekoBot.Modules.Games { public static ConcurrentDictionary RunningTrivias = new ConcurrentDictionary(); - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Trivia(IUserMessage umsg, params string[] args) { @@ -44,7 +44,7 @@ namespace NadekoBot.Modules.Games await channel.SendMessageAsync("Trivia game is already running on this server.\n" + trivia.CurrentQuestion).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Tl(IUserMessage umsg) { @@ -57,7 +57,7 @@ namespace NadekoBot.Modules.Games await channel.SendMessageAsync("No trivia is running on this server.").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Tq(IUserMessage umsg) { diff --git a/src/NadekoBot/Modules/Games/Games.cs b/src/NadekoBot/Modules/Games/Games.cs index 99083ae7..ea57db12 100644 --- a/src/NadekoBot/Modules/Games/Games.cs +++ b/src/NadekoBot/Modules/Games/Games.cs @@ -27,7 +27,7 @@ namespace NadekoBot.Modules.Games { } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Choose(IUserMessage umsg, [Remainder] string list = null) { @@ -41,7 +41,7 @@ namespace NadekoBot.Modules.Games await channel.SendMessageAsync(listArr[rng.Next(0, listArr.Length)]).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task _8Ball(IUserMessage umsg, [Remainder] string question = null) { @@ -54,7 +54,7 @@ namespace NadekoBot.Modules.Games šŸŽ± `8Ball Answers` __**{_8BallResponses.Shuffle().FirstOrDefault()}**__").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Rps(IUserMessage umsg, string input) { @@ -104,7 +104,7 @@ namespace NadekoBot.Modules.Games await channel.SendMessageAsync(msg).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Linux(IUserMessage umsg, string guhnoo, string loonix) { diff --git a/src/NadekoBot/Modules/Help/Help.cs b/src/NadekoBot/Modules/Help/Help.cs index 070b6930..40775a4e 100644 --- a/src/NadekoBot/Modules/Help/Help.cs +++ b/src/NadekoBot/Modules/Help/Help.cs @@ -9,6 +9,8 @@ using System; using System.IO; using System.Text; using Discord.WebSocket; +using System.Collections; +using System.Collections.Generic; namespace NadekoBot.Modules.Help { @@ -25,17 +27,17 @@ namespace NadekoBot.Modules.Help { } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Modules(IUserMessage umsg) { var channel = (ITextChannel)umsg.Channel; - await channel.SendMessageAsync("`List of modules:` \nā€¢ " + string.Join("\nā€¢ ", _commands.Modules.Select(m => m.Name)) + $"\n`Type \"-commands module_name\" to get a list of commands in that module.`") + await channel.SendMessageAsync("`List of modules:` ```xl\nā€¢ " + string.Join("\nā€¢ ", _commands.Modules.Select(m => m.Name)) + $"\n``` `Type \"-commands module_name\" to get a list of commands in that module.`") .ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Commands(IUserMessage umsg, [Remainder] string module = null) { @@ -46,7 +48,9 @@ namespace NadekoBot.Modules.Help return; var cmds = _commands.Commands.Where(c => c.Module.Name.ToUpperInvariant().StartsWith(module)) .OrderBy(c => c.Text) + .Distinct(new CommandTextEqualityComparer()) .AsEnumerable(); + var cmdsArray = cmds as Command[] ?? cmds.ToArray(); if (!cmdsArray.Any()) { @@ -64,7 +68,7 @@ namespace NadekoBot.Modules.Help await channel.SendMessageAsync($"`You can type \"-h command_name\" to see the help about that specific command.`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task H(IUserMessage umsg, [Remainder] string comToFind = null) { @@ -88,11 +92,11 @@ namespace NadekoBot.Modules.Help if (alias != null) str += $" / `{ alias }`"; if (com != null) - await channel.SendMessageAsync(str + $@"{Environment.NewLine}**Desc:** {com.Description} + await channel.SendMessageAsync(str + $@"{Environment.NewLine}**Desc:** {com.Remarks} **Usage:** {com.Summary}").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Hgit(IUserMessage umsg) { @@ -108,7 +112,7 @@ namespace NadekoBot.Modules.Help helpstr.AppendLine("----------------|--------------|-------"); lastModule = com.Module.Name; } - helpstr.AppendLine($"`{com.Text}` {string.Join(" ", com.Aliases.Skip(1).Select(a=>"`"+a+"`"))} | {com.Description} | {com.Summary}"); + helpstr.AppendLine($"`{com.Text}` {string.Join(" ", com.Aliases.Skip(1).Select(a=>"`"+a+"`"))} | {com.Remarks} | {com.Summary}"); } helpstr = helpstr.Replace((await NadekoBot.Client.GetCurrentUserAsync()).Username , "@BotName"); #if DEBUG @@ -118,7 +122,7 @@ namespace NadekoBot.Modules.Help #endif } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Guide(IUserMessage umsg) { @@ -129,7 +133,7 @@ namespace NadekoBot.Modules.Help **Hosting Guides and docs can be found here**: ").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Donate(IUserMessage umsg) { @@ -143,4 +147,12 @@ Don't forget to leave your discord name or id in the message. **Thank you** ā™„ļø").ConfigureAwait(false); } } + + public class CommandTextEqualityComparer : IEqualityComparer + { + public bool Equals(Command x, Command y) => x.Text == y.Text; + + public int GetHashCode(Command obj) => obj.Text.GetHashCode(); + + } } \ No newline at end of file diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index b2709a72..db9b285f 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Music _google = google; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public Task Next(IUserMessage umsg) { @@ -48,7 +48,7 @@ namespace NadekoBot.Modules.Music return Task.CompletedTask; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public Task Stop(IUserMessage umsg) { @@ -64,7 +64,7 @@ namespace NadekoBot.Modules.Music return Task.CompletedTask; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public Task Destroy(IUserMessage umsg) { @@ -77,7 +77,7 @@ namespace NadekoBot.Modules.Music return Task.CompletedTask; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Pause(IUserMessage umsg) { @@ -94,7 +94,7 @@ namespace NadekoBot.Modules.Music await channel.SendMessageAsync("šŸŽµ`Music Player unpaused.`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Queue(IUserMessage umsg, [Remainder] string query) { @@ -108,7 +108,7 @@ namespace NadekoBot.Modules.Music } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task SoundCloudQueue(IUserMessage umsg, [Remainder] string query) { @@ -122,7 +122,7 @@ namespace NadekoBot.Modules.Music } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ListQueue(IUserMessage umsg, int page = 1) { @@ -155,7 +155,7 @@ namespace NadekoBot.Modules.Music await channel.SendMessageAsync(toSend + string.Join("\n", musicPlayer.Playlist.Skip(startAt).Take(15).Select(v => $"`{number++}.` {v.PrettyName}"))).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task NowPlaying(IUserMessage umsg) { @@ -170,7 +170,7 @@ namespace NadekoBot.Modules.Music $"{currentSong.PrettyCurrentTime()}").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Volume(IUserMessage umsg, int val) { @@ -186,7 +186,7 @@ namespace NadekoBot.Modules.Music await channel.SendMessageAsync($"šŸŽµ `Volume set to {volume}%`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Defvol(IUserMessage umsg, [Remainder] int val) { @@ -205,7 +205,7 @@ namespace NadekoBot.Modules.Music await channel.SendMessageAsync($"šŸŽµ `Default volume set to {val}%`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public Task Mute(IUserMessage umsg) { @@ -219,7 +219,7 @@ namespace NadekoBot.Modules.Music return Task.CompletedTask; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public Task Max(IUserMessage umsg) { @@ -233,7 +233,7 @@ namespace NadekoBot.Modules.Music return Task.CompletedTask; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Shuffle(IUserMessage umsg) { @@ -253,7 +253,7 @@ namespace NadekoBot.Modules.Music await channel.SendMessageAsync("šŸŽµ `Songs shuffled.`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Playlist(IUserMessage umsg, [Remainder] string playlist) { @@ -295,7 +295,7 @@ namespace NadekoBot.Modules.Music await msg.ModifyAsync(m => m.Content = "šŸŽµ `Playlist queue complete.`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task SoundCloudPl(IUserMessage umsg, [Remainder] string pl) { @@ -332,7 +332,7 @@ namespace NadekoBot.Modules.Music } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task LocalPl(IUserMessage umsg, [Remainder] string directory) { @@ -361,7 +361,7 @@ namespace NadekoBot.Modules.Music catch { } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Radio(IUserMessage umsg, string radio_link) { @@ -379,7 +379,7 @@ namespace NadekoBot.Modules.Music } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Local(IUserMessage umsg, [Remainder] string path) { @@ -391,7 +391,7 @@ namespace NadekoBot.Modules.Music } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Move(IUserMessage umsg) { @@ -403,7 +403,7 @@ namespace NadekoBot.Modules.Music await musicPlayer.MoveToVoiceChannel(voiceChannel); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Remove(IUserMessage umsg, int num) { @@ -423,7 +423,7 @@ namespace NadekoBot.Modules.Music await channel.SendMessageAsync($"šŸŽµ**Track {song.PrettyName} at position `#{num}` has been removed.**").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Remove(IUserMessage umsg, string all) { @@ -438,7 +438,7 @@ namespace NadekoBot.Modules.Music return; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task MoveSong(IUserMessage umsg, [Remainder] string fromto) { @@ -474,7 +474,7 @@ namespace NadekoBot.Modules.Music } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task SetMaxQueue(IUserMessage umsg, uint size) { @@ -488,7 +488,7 @@ namespace NadekoBot.Modules.Music await channel.SendMessageAsync($"šŸŽµ `Max queue set to {(size == 0 ? ("unlimited") : size + " tracks")}`"); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ReptCurSong(IUserMessage umsg) { @@ -506,7 +506,7 @@ namespace NadekoBot.Modules.Music .ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task RepeatPl(IUserMessage umsg) { @@ -551,7 +551,7 @@ namespace NadekoBot.Modules.Music //} - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Goto(IUserMessage umsg, int time) { @@ -588,7 +588,7 @@ namespace NadekoBot.Modules.Music await channel.SendMessageAsync($"`Skipped to {minutes}:{seconds}`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task GetLink(IUserMessage umsg, int index = 0) { @@ -623,7 +623,7 @@ namespace NadekoBot.Modules.Music } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Autoplay(IUserMessage umsg) { diff --git a/src/NadekoBot/Modules/NSFW/NSFW.cs b/src/NadekoBot/Modules/NSFW/NSFW.cs index cbcfc15d..3b7a6e62 100644 --- a/src/NadekoBot/Modules/NSFW/NSFW.cs +++ b/src/NadekoBot/Modules/NSFW/NSFW.cs @@ -22,7 +22,7 @@ namespace NadekoBot.Modules.NSFW { } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Hentai(IUserMessage umsg, [Remainder] string tag = null) { @@ -41,7 +41,7 @@ namespace NadekoBot.Modules.NSFW await channel.SendMessageAsync(String.Join("\n\n", links)).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Danbooru(IUserMessage umsg, [Remainder] string tag = null) { @@ -55,7 +55,7 @@ namespace NadekoBot.Modules.NSFW await channel.SendMessageAsync(link).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Gelbooru(IUserMessage umsg, [Remainder] string tag = null) { @@ -69,7 +69,7 @@ namespace NadekoBot.Modules.NSFW await channel.SendMessageAsync(link).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Rule34(IUserMessage umsg, [Remainder] string tag = null) { @@ -83,7 +83,7 @@ namespace NadekoBot.Modules.NSFW await channel.SendMessageAsync(link).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task E621(IUserMessage umsg, [Remainder] string tag = null) { @@ -97,7 +97,7 @@ namespace NadekoBot.Modules.NSFW await channel.SendMessageAsync(link).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Cp(IUserMessage umsg) { @@ -106,7 +106,7 @@ namespace NadekoBot.Modules.NSFW await channel.SendMessageAsync("http://i.imgur.com/MZkY1md.jpg").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Boobs(IUserMessage umsg) { @@ -126,7 +126,7 @@ namespace NadekoBot.Modules.NSFW } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Butts(IUserMessage umsg) { diff --git a/src/NadekoBot/Modules/Permissions/PermissionExtensions.cs b/src/NadekoBot/Modules/Permissions/PermissionExtensions.cs index f1c668c7..bb131b14 100644 --- a/src/NadekoBot/Modules/Permissions/PermissionExtensions.cs +++ b/src/NadekoBot/Modules/Permissions/PermissionExtensions.cs @@ -49,8 +49,10 @@ namespace NadekoBot.Modules.Permissions { if (!((perm.SecondaryTarget == SecondaryPermissionType.Command && perm.SecondaryTargetName == command.Text.ToLowerInvariant()) || - (perm.SecondaryTarget == SecondaryPermissionType.Module && - perm.SecondaryTargetName == command.Module.Name.ToLowerInvariant()))) + ((perm.SecondaryTarget == SecondaryPermissionType.Module || perm.SecondaryTarget == SecondaryPermissionType.AllCommands) && + perm.SecondaryTargetName == command.Module.Name.ToLowerInvariant()) || + perm.SecondaryTarget == SecondaryPermissionType.AllModules || + (perm.SecondaryTarget == SecondaryPermissionType.AllCommands && perm.SecondaryTargetName == command.Module.Name.ToLowerInvariant()))) return null; switch (perm.PrimaryTarget) @@ -76,7 +78,7 @@ namespace NadekoBot.Modules.Permissions public static string GetCommand(this Permission perm) { - var com = NadekoBot.ModulePrefixes[typeof(Permissions).Name]; + var com = ""; switch (perm.PrimaryTarget) { case PrimaryPermissionType.User: @@ -98,6 +100,12 @@ namespace NadekoBot.Modules.Permissions case SecondaryPermissionType.Command: com += "c"; break; + case SecondaryPermissionType.AllCommands: + com = "a" + com + "c"; + break; + case SecondaryPermissionType.AllModules: + com = "a" + com + "m"; + break; } com += " " + perm.SecondaryTargetName + " " + (perm.State ? "enable" : "disable") + " "; @@ -114,7 +122,7 @@ namespace NadekoBot.Modules.Permissions break; } - return com; + return NadekoBot.ModulePrefixes[typeof(Permissions).Name] + com; } } diff --git a/src/NadekoBot/Modules/Permissions/Permissions.cs b/src/NadekoBot/Modules/Permissions/Permissions.cs index 8a9357d3..d35c8810 100644 --- a/src/NadekoBot/Modules/Permissions/Permissions.cs +++ b/src/NadekoBot/Modules/Permissions/Permissions.cs @@ -20,7 +20,7 @@ namespace NadekoBot.Modules.Permissions { } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ListPerms(IUserMessage msg) { @@ -41,7 +41,7 @@ namespace NadekoBot.Modules.Permissions await channel.SendMessageAsync(toSend).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task UsrCmd(IUserMessage imsg, Command command, PermissionAction action, IGuildUser user) { @@ -62,7 +62,7 @@ namespace NadekoBot.Modules.Permissions await channel.SendMessageAsync($"{(action.Value ? "Allowed" : "Denied")} usage of `{command.Text}` command for `{user}` user.").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task UsrMdl(IUserMessage imsg, Module module, PermissionAction action, IGuildUser user) { @@ -82,5 +82,216 @@ namespace NadekoBot.Modules.Permissions } await channel.SendMessageAsync($"{(action.Value ? "Allowed" : "Denied")} usage of `{module.Name}` module for `{user}` user.").ConfigureAwait(false); } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + public async Task RoleCmd(IUserMessage imsg, Command command, PermissionAction action, IRole role) + { + var channel = (ITextChannel)imsg.Channel; + + using (var uow = DbHandler.UnitOfWork()) + { + uow.GuildConfigs.For(channel.Guild.Id).Permissions.Add(new Permission + { + PrimaryTarget = PrimaryPermissionType.Role, + PrimaryTargetId = role.Id, + SecondaryTarget = SecondaryPermissionType.Command, + SecondaryTargetName = command.Text.ToLowerInvariant(), + State = action.Value, + }); + await uow.CompleteAsync().ConfigureAwait(false); + } + await channel.SendMessageAsync($"{(action.Value ? "Allowed" : "Denied")} usage of `{command.Text}` command for `{role}` role.").ConfigureAwait(false); + } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + public async Task RoleMdl(IUserMessage imsg, Module module, PermissionAction action, IRole role) + { + var channel = (ITextChannel)imsg.Channel; + + using (var uow = DbHandler.UnitOfWork()) + { + uow.GuildConfigs.For(channel.Guild.Id).Permissions.Add(new Permission + { + PrimaryTarget = PrimaryPermissionType.Role, + PrimaryTargetId = role.Id, + SecondaryTarget = SecondaryPermissionType.Module, + SecondaryTargetName = module.Name.ToLowerInvariant(), + State = action.Value, + }); + await uow.CompleteAsync().ConfigureAwait(false); + } + await channel.SendMessageAsync($"{(action.Value ? "Allowed" : "Denied")} usage of `{module.Name}` module for `{role}` role.").ConfigureAwait(false); + } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + public async Task ChnlCmd(IUserMessage imsg, Command command, PermissionAction action, ITextChannel chnl) + { + var channel = (ITextChannel)imsg.Channel; + + using (var uow = DbHandler.UnitOfWork()) + { + uow.GuildConfigs.For(channel.Guild.Id).Permissions.Add(new Permission + { + PrimaryTarget = PrimaryPermissionType.Channel, + PrimaryTargetId = chnl.Id, + SecondaryTarget = SecondaryPermissionType.Command, + SecondaryTargetName = command.Text.ToLowerInvariant(), + State = action.Value, + }); + await uow.CompleteAsync().ConfigureAwait(false); + } + await channel.SendMessageAsync($"{(action.Value ? "Allowed" : "Denied")} usage of `{command.Text}` command for `{chnl}` channel.").ConfigureAwait(false); + } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + public async Task ChnlMdl(IUserMessage imsg, Module module, PermissionAction action, ITextChannel chnl) + { + var channel = (ITextChannel)imsg.Channel; + + using (var uow = DbHandler.UnitOfWork()) + { + uow.GuildConfigs.For(channel.Guild.Id).Permissions.Add(new Permission + { + PrimaryTarget = PrimaryPermissionType.Channel, + PrimaryTargetId = chnl.Id, + SecondaryTarget = SecondaryPermissionType.Module, + SecondaryTargetName = module.Name.ToLowerInvariant(), + State = action.Value, + }); + await uow.CompleteAsync().ConfigureAwait(false); + } + await channel.SendMessageAsync($"{(action.Value ? "Allowed" : "Denied")} usage of `{module.Name}` module for `{chnl}` channel.").ConfigureAwait(false); + } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + public async Task AllChnlMdls(IUserMessage imsg, PermissionAction action, ITextChannel chnl) + { + var channel = (ITextChannel)imsg.Channel; + + using (var uow = DbHandler.UnitOfWork()) + { + uow.GuildConfigs.For(channel.Guild.Id).Permissions.Add(new Permission + { + PrimaryTarget = PrimaryPermissionType.Channel, + PrimaryTargetId = chnl.Id, + SecondaryTarget = SecondaryPermissionType.AllModules, + SecondaryTargetName = "*", + State = action.Value, + }); + await uow.CompleteAsync().ConfigureAwait(false); + } + await channel.SendMessageAsync($"{(action.Value ? "Allowed" : "Denied")} usage of `ALL MODULES` for `{chnl}` channel.").ConfigureAwait(false); + } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + public async Task AllRoleMdls(IUserMessage imsg, PermissionAction action, IRole role) + { + var channel = (ITextChannel)imsg.Channel; + + using (var uow = DbHandler.UnitOfWork()) + { + uow.GuildConfigs.For(channel.Guild.Id).Permissions.Add(new Permission + { + PrimaryTarget = PrimaryPermissionType.Role, + PrimaryTargetId = role.Id, + SecondaryTarget = SecondaryPermissionType.AllModules, + SecondaryTargetName = "*", + State = action.Value, + }); + await uow.CompleteAsync().ConfigureAwait(false); + } + await channel.SendMessageAsync($"{(action.Value ? "Allowed" : "Denied")} usage of `ALL MODULES` for `{role}` role.").ConfigureAwait(false); + } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + public async Task AllUserMdls(IUserMessage imsg, PermissionAction action, IUser user) + { + var channel = (ITextChannel)imsg.Channel; + + using (var uow = DbHandler.UnitOfWork()) + { + uow.GuildConfigs.For(channel.Guild.Id).Permissions.Add(new Permission + { + PrimaryTarget = PrimaryPermissionType.User, + PrimaryTargetId = user.Id, + SecondaryTarget = SecondaryPermissionType.AllModules, + SecondaryTargetName = "*", + State = action.Value, + }); + await uow.CompleteAsync().ConfigureAwait(false); + } + await channel.SendMessageAsync($"{(action.Value ? "Allowed" : "Denied")} usage of `ALL MODULES` for `{user}` user.").ConfigureAwait(false); + } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + public async Task AllChnlCmds(IUserMessage imsg, Module module, PermissionAction action, ITextChannel chnl) + { + var channel = (ITextChannel)imsg.Channel; + + using (var uow = DbHandler.UnitOfWork()) + { + uow.GuildConfigs.For(channel.Guild.Id).Permissions.Add(new Permission + { + PrimaryTarget = PrimaryPermissionType.Channel, + PrimaryTargetId = chnl.Id, + SecondaryTarget = SecondaryPermissionType.Command, + SecondaryTargetName = module.Name.ToLowerInvariant(), + State = action.Value, + }); + await uow.CompleteAsync().ConfigureAwait(false); + } + await channel.SendMessageAsync($"{(action.Value ? "Allowed" : "Denied")} usage of `ALL COMMANDS` from `{module.Name}` module for `{chnl}` channel.").ConfigureAwait(false); + } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + public async Task AllRoleCmds(IUserMessage imsg, Module module, PermissionAction action, IRole role) + { + var channel = (ITextChannel)imsg.Channel; + + using (var uow = DbHandler.UnitOfWork()) + { + uow.GuildConfigs.For(channel.Guild.Id).Permissions.Add(new Permission + { + PrimaryTarget = PrimaryPermissionType.Role, + PrimaryTargetId = role.Id, + SecondaryTarget = SecondaryPermissionType.AllCommands, + SecondaryTargetName = module.Name.ToLowerInvariant(), + State = action.Value, + }); + await uow.CompleteAsync().ConfigureAwait(false); + } + await channel.SendMessageAsync($"{(action.Value ? "Allowed" : "Denied")} usage of `ALL COMMANDS` from `{module.Name}` module for `{role}` role.").ConfigureAwait(false); + } + + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] + [RequireContext(ContextType.Guild)] + public async Task AllUserCmds(IUserMessage imsg, Module module, PermissionAction action, IUser user) + { + var channel = (ITextChannel)imsg.Channel; + + using (var uow = DbHandler.UnitOfWork()) + { + uow.GuildConfigs.For(channel.Guild.Id).Permissions.Add(new Permission + { + PrimaryTarget = PrimaryPermissionType.User, + PrimaryTargetId = user.Id, + SecondaryTarget = SecondaryPermissionType.AllCommands, + SecondaryTargetName = module.Name.ToLowerInvariant(), + State = action.Value, + }); + await uow.CompleteAsync().ConfigureAwait(false); + } + await channel.SendMessageAsync($"{(action.Value ? "Allowed" : "Denied")} usage of `ALL COMMANDS` from `{module.Name}` module for `{user}` user.").ConfigureAwait(false); + } + } } diff --git a/src/NadekoBot/Modules/Pokemon/Pokemon.cs b/src/NadekoBot/Modules/Pokemon/Pokemon.cs index 31082944..870aa482 100644 --- a/src/NadekoBot/Modules/Pokemon/Pokemon.cs +++ b/src/NadekoBot/Modules/Pokemon/Pokemon.cs @@ -15,7 +15,7 @@ namespace NadekoBot.Modules.Games } //todo Dragon should PR this in - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Poke(IUserMessage umsg) { diff --git a/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs b/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs index dd96cf0e..15803201 100644 --- a/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs @@ -29,7 +29,7 @@ namespace NadekoBot.Modules.Searches _log = LogManager.GetCurrentClassLogger(); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Anime(IUserMessage umsg, [Remainder] string query) { @@ -43,7 +43,7 @@ namespace NadekoBot.Modules.Searches await channel.SendMessageAsync(result.ToString() ?? "`No anime found.`").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Manga(IUserMessage umsg, [Remainder] string query) { diff --git a/src/NadekoBot/Modules/Searches/Commands/CalcCommand.cs b/src/NadekoBot/Modules/Searches/Commands/CalcCommand.cs index 1f9f00dc..b1faf848 100644 --- a/src/NadekoBot/Modules/Searches/Commands/CalcCommand.cs +++ b/src/NadekoBot/Modules/Searches/Commands/CalcCommand.cs @@ -14,7 +14,7 @@ namespace NadekoBot.Modules.Searches [Group] public partial class Searches { - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public static async Task Calculate(IUserMessage msg, [Remainder] string expression) { @@ -41,7 +41,7 @@ namespace NadekoBot.Modules.Searches } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task CalcOps(IUserMessage msg) { diff --git a/src/NadekoBot/Modules/Searches/Commands/JokeCommands.cs b/src/NadekoBot/Modules/Searches/Commands/JokeCommands.cs index 4bacbb52..1df3fcea 100644 --- a/src/NadekoBot/Modules/Searches/Commands/JokeCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/JokeCommands.cs @@ -42,7 +42,7 @@ namespace NadekoBot.Modules.Searches _log.Warn("data/magicitems.json is missing. Magic items are not loaded."); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Yomama(IUserMessage umsg) { @@ -54,7 +54,7 @@ namespace NadekoBot.Modules.Searches } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Randjoke(IUserMessage umsg) { @@ -66,7 +66,7 @@ namespace NadekoBot.Modules.Searches } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ChuckNorris(IUserMessage umsg) { @@ -78,7 +78,7 @@ namespace NadekoBot.Modules.Searches } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task WowJoke(IUserMessage umsg) { @@ -90,7 +90,7 @@ namespace NadekoBot.Modules.Searches await channel.SendMessageAsync(wowJokes[new NadekoRandom().Next(0, wowJokes.Count)].ToString()); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task MagicItem(IUserMessage umsg) { diff --git a/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs b/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs index 0dc758e3..d667b270 100644 --- a/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs @@ -32,7 +32,7 @@ namespace NadekoBot.Modules.Searches "Doesn't matter what you ban really. Enemy will ban your main and you will lose." }; - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Lolban(IUserMessage umsg) { diff --git a/src/NadekoBot/Modules/Searches/Commands/MemegenCommands.cs b/src/NadekoBot/Modules/Searches/Commands/MemegenCommands.cs index 43b6fbe4..ffccb71a 100644 --- a/src/NadekoBot/Modules/Searches/Commands/MemegenCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/MemegenCommands.cs @@ -15,7 +15,7 @@ namespace NadekoBot.Modules.Searches { public partial class Searches { - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Memelist(IUserMessage umsg) { @@ -29,7 +29,7 @@ namespace NadekoBot.Modules.Searches } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Memegen(IUserMessage umsg, string meme, string topText, string botText) { diff --git a/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs b/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs index fffe02e2..481e250b 100644 --- a/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs @@ -25,7 +25,7 @@ namespace NadekoBot.Modules.Searches { _log = LogManager.GetCurrentClassLogger(); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Osu(IUserMessage umsg, string usr, string mode) { @@ -58,7 +58,7 @@ namespace NadekoBot.Modules.Searches } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Osub(IUserMessage umsg, [Remainder] string map) { @@ -95,7 +95,7 @@ namespace NadekoBot.Modules.Searches } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Osu5(IUserMessage umsg, string user, [Remainder] string mode) { diff --git a/src/NadekoBot/Modules/Searches/Commands/PokemonSearchCommands.cs b/src/NadekoBot/Modules/Searches/Commands/PokemonSearchCommands.cs index e090d09f..55885f7c 100644 --- a/src/NadekoBot/Modules/Searches/Commands/PokemonSearchCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/PokemonSearchCommands.cs @@ -38,7 +38,7 @@ namespace NadekoBot.Modules.Searches _log.Warn(PokemonAbilitiesFile + " is missing. Pokemon abilities not loaded."); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Pokemon(IUserMessage umsg, [Remainder] string pokemon = null) { @@ -59,7 +59,7 @@ namespace NadekoBot.Modules.Searches await channel.SendMessageAsync("`No pokemon found.`"); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task PokemonAbility(IUserMessage umsg, [Remainder] string ability = null) { diff --git a/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs b/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs index 03f5fc8e..7b250624 100644 --- a/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs @@ -132,28 +132,28 @@ namespace NadekoBot.Modules.Searches return new Tuple(false, "0"); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageMessages)] public async Task Hitbox(IUserMessage msg, [Remainder] string username) => await TrackStream((ITextChannel)msg.Channel, username, FollowedStream.FollowedStreamType.Hitbox) .ConfigureAwait(false); - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageMessages)] public async Task Twitch(IUserMessage msg, [Remainder] string username) => await TrackStream((ITextChannel)msg.Channel, username, FollowedStream.FollowedStreamType.Twitch) .ConfigureAwait(false); - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageMessages)] public async Task Beam(IUserMessage msg, [Remainder] string username) => await TrackStream((ITextChannel)msg.Channel, username, FollowedStream.FollowedStreamType.Beam) .ConfigureAwait(false); - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ListStreams(IUserMessage imsg) { @@ -179,7 +179,7 @@ namespace NadekoBot.Modules.Searches await channel.SendMessageAsync($"You are following **{streams.Count()}** streams on this server.\n\n" + text).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task RemoveStream(IUserMessage msg, [Remainder] string username) { @@ -207,7 +207,7 @@ namespace NadekoBot.Modules.Searches await channel.SendMessageAsync($":ok: Removed `{toRemove.Username}`'s stream ({toRemove.Type}) from notifications.").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task CheckStream(IUserMessage imsg, FollowedStream.FollowedStreamType platform, [Remainder] string username) { diff --git a/src/NadekoBot/Modules/Searches/Commands/UnitConversion.cs b/src/NadekoBot/Modules/Searches/Commands/UnitConversion.cs index 64422620..e4f19cba 100644 --- a/src/NadekoBot/Modules/Searches/Commands/UnitConversion.cs +++ b/src/NadekoBot/Modules/Searches/Commands/UnitConversion.cs @@ -96,7 +96,7 @@ namespace NadekoBot.Modules.Searches public List Units { get; set; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ConvertListE(IUserMessage msg) //extended and bugged list { @@ -115,7 +115,7 @@ namespace NadekoBot.Modules.Searches } await msg.ReplyLong(sb.ToString(), breakOn: new[] { "```xl", "\n" }); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ConvertList(IUserMessage msg) { @@ -129,7 +129,7 @@ namespace NadekoBot.Modules.Searches } await msg.ReplyLong(sb.ToString(), breakOn: new[] { "```xl\n", "\n" }); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] public async Task Convert(IUserMessage msg, string origin, string target, decimal value) { var originUnit = Units.Find(x => x.Triggers.Select(y => y.ToLowerInvariant()).Contains(origin.ToLowerInvariant())); diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/src/NadekoBot/Modules/Searches/Searches.cs index da2fee95..cb886063 100644 --- a/src/NadekoBot/Modules/Searches/Searches.cs +++ b/src/NadekoBot/Modules/Searches/Searches.cs @@ -30,7 +30,7 @@ namespace NadekoBot.Modules.Searches _google = youtube; } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Weather(IUserMessage umsg, string city, string country) { @@ -51,7 +51,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 šŸŒ„ **Sunrise:** {obj["sunrise"]} šŸŒ‡ **Sunset:** {obj["sunset"]}").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Youtube(IUserMessage umsg, [Remainder] string query = null) { @@ -66,7 +66,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 await channel.SendMessageAsync(result).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Imdb(IUserMessage umsg, [Remainder] string query = null) { @@ -90,7 +90,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 await channel.SendMessageAsync(result.ToString()).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task RandomCat(IUserMessage umsg) { @@ -103,7 +103,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task RandomDog(IUserMessage umsg) { @@ -114,7 +114,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task I(IUserMessage umsg, [Remainder] string query = null) { @@ -144,7 +144,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Ir(IUserMessage umsg, [Remainder] string query = null) { @@ -176,7 +176,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Lmgtfy(IUserMessage umsg, [Remainder] string ffs = null) { @@ -190,7 +190,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 .ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Google(IUserMessage umsg, [Remainder] string terms = null) { @@ -204,7 +204,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 .ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Hearthstone(IUserMessage umsg, [Remainder] string name = null) { @@ -256,7 +256,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Ud(IUserMessage umsg, [Remainder] string query = null) { @@ -290,7 +290,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Hashtag(IUserMessage umsg, [Remainder] string query = null) { @@ -325,7 +325,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Catfact(IUserMessage umsg) { @@ -339,7 +339,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Revav(IUserMessage umsg, [Remainder] string arg = null) { @@ -356,7 +356,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 await channel.SendMessageAsync($"https://images.google.com/searchbyimage?image_url={usr.AvatarUrl}").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Revimg(IUserMessage umsg, [Remainder] string imageLink = null) { @@ -368,7 +368,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 await channel.SendMessageAsync($"https://images.google.com/searchbyimage?image_url={imageLink}").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Safebooru(IUserMessage umsg, [Remainder] string tag = null) { @@ -382,7 +382,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 await channel.SendMessageAsync(link).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Wiki(IUserMessage umsg, [Remainder] string query = null) { @@ -402,7 +402,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Clr(IUserMessage umsg, [Remainder] string color = null) { @@ -422,7 +422,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 await channel.SendFileAsync(img.ToStream(), $"{color}.png"); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Videocall(IUserMessage umsg, [Remainder] string arg = null) { @@ -445,7 +445,7 @@ $@"šŸŒ **Weather for** 怐{obj["target"]}怑 } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Avatar(IUserMessage umsg, [Remainder] string mention = null) { diff --git a/src/NadekoBot/Modules/Translator/Translator.cs b/src/NadekoBot/Modules/Translator/Translator.cs index e974746a..4d66a7a6 100644 --- a/src/NadekoBot/Modules/Translator/Translator.cs +++ b/src/NadekoBot/Modules/Translator/Translator.cs @@ -16,7 +16,7 @@ namespace NadekoBot.Modules.Translator { } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Translate(IUserMessage umsg, string langs, [Remainder] string text = null) { @@ -44,7 +44,7 @@ namespace NadekoBot.Modules.Translator } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Translangs(IUserMessage umsg) { diff --git a/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs b/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs index 9993c1d3..1e4683e6 100644 --- a/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs @@ -12,7 +12,7 @@ namespace NadekoBot.Modules.Utility { partial class Utility : DiscordModule { - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ServerInfo(IUserMessage msg, string guild = null) { @@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Utility await msg.Reply(sb.ToString()).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ChannelInfo(IUserMessage msg, ITextChannel channel = null) { @@ -63,7 +63,7 @@ namespace NadekoBot.Modules.Utility await msg.Reply(toReturn).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task UserInfo(IUserMessage msg, IGuildUser usr = null) { diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index f2102c15..4995703e 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -14,7 +14,7 @@ namespace NadekoBot.Modules.Utility { public partial class Utility { - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ShowQuote(IUserMessage umsg, string keyword) { @@ -37,7 +37,7 @@ namespace NadekoBot.Modules.Utility await channel.SendMessageAsync("šŸ“£ " + quote.Text); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task AddQuote(IUserMessage umsg, string keyword, [Remainder] string text) { @@ -63,7 +63,7 @@ namespace NadekoBot.Modules.Utility } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task DeleteQuote(IUserMessage umsg, string keyword) { @@ -90,7 +90,7 @@ namespace NadekoBot.Modules.Utility await channel.SendMessageAsync("`Deleted a random quote.`"); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task DelAllQuotes(IUserMessage umsg, string keyword) { diff --git a/src/NadekoBot/Modules/Utility/Commands/Remind.cs b/src/NadekoBot/Modules/Utility/Commands/Remind.cs index ba48f1e9..2ecc2140 100644 --- a/src/NadekoBot/Modules/Utility/Commands/Remind.cs +++ b/src/NadekoBot/Modules/Utility/Commands/Remind.cs @@ -92,7 +92,7 @@ namespace NadekoBot.Modules.Utility } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Remind(IUserMessage umsg, string meorchannel, string timeStr, [Remainder] string message) { diff --git a/src/NadekoBot/Modules/Utility/Utility.cs b/src/NadekoBot/Modules/Utility/Utility.cs index 5ce18ef3..2614faea 100644 --- a/src/NadekoBot/Modules/Utility/Utility.cs +++ b/src/NadekoBot/Modules/Utility/Utility.cs @@ -23,7 +23,7 @@ namespace NadekoBot.Modules.Utility } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task WhosPlaying(IUserMessage umsg, [Remainder] string game = null) { @@ -43,7 +43,7 @@ namespace NadekoBot.Modules.Utility await channel.SendMessageAsync("```xl\n" + string.Join("\n", arr.GroupBy(item => (i++) / 3).Select(ig => string.Concat(ig.Select(el => $"ā€¢ {el,-35}")))) + "\n```").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task InRole(IUserMessage umsg, [Remainder] string roles = null) { @@ -76,7 +76,7 @@ namespace NadekoBot.Modules.Utility await channel.SendMessageAsync(send).ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task CheckMyPerms(IUserMessage msg) { @@ -93,7 +93,7 @@ namespace NadekoBot.Modules.Utility await msg.Reply(builder.ToString()); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task UserId(IUserMessage msg, IGuildUser target = null) { @@ -101,20 +101,20 @@ namespace NadekoBot.Modules.Utility await msg.Reply($"Id of the user { usr.Username } is { usr.Id })").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] public async Task ChannelId(IUserMessage msg) { await msg.Reply($"This Channel's ID is {msg.Channel.Id}").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ServerId(IUserMessage msg) { await msg.Reply($"This server's ID is {((ITextChannel)msg.Channel).Guild.Id}").ConfigureAwait(false); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Roles(IUserMessage msg, IGuildUser target = null) { @@ -130,7 +130,7 @@ namespace NadekoBot.Modules.Utility } } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task ChannelTopic(IUserMessage umsg) { @@ -143,7 +143,7 @@ namespace NadekoBot.Modules.Utility await channel.SendMessageAsync("`Topic:` " + topic); } - [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] + [LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] [RequireContext(ContextType.Guild)] public async Task Stats(IUserMessage umsg) { diff --git a/src/NadekoBot/Resources/CommandStrings.Designer.cs b/src/NadekoBot/Resources/CommandStrings.Designer.cs index b727a16e..8f4f90f4 100644 --- a/src/NadekoBot/Resources/CommandStrings.Designer.cs +++ b/src/NadekoBot/Resources/CommandStrings.Designer.cs @@ -1671,7 +1671,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to commands. + /// Looks up a localized string similar to commands cmds. /// public static string commands_text { get { @@ -4209,7 +4209,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to modules. + /// Looks up a localized string similar to modules mdls. /// public static string modules_text { get { diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx index 5425ea2f..31d4bda9 100644 --- a/src/NadekoBot/Resources/CommandStrings.resx +++ b/src/NadekoBot/Resources/CommandStrings.resx @@ -145,7 +145,7 @@ `-donate` or `~donate` - modules + modules mdls List all bot modules. @@ -154,7 +154,7 @@ `-modules` or `.modules` - commands + commands cmds List all of the bot's commands from a certain module. diff --git a/src/NadekoBot/Services/Database/Models/Permission.cs b/src/NadekoBot/Services/Database/Models/Permission.cs index de342b6b..6c620ecb 100644 --- a/src/NadekoBot/Services/Database/Models/Permission.cs +++ b/src/NadekoBot/Services/Database/Models/Permission.cs @@ -27,6 +27,8 @@ namespace NadekoBot.Services.Database.Models public enum SecondaryPermissionType { Module, - Command + Command, + AllCommands, + AllModules } }