mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-03 16:24:27 -05:00 
			
		
		
		
	- removed unused attributes on commands
- Removed some commented out files
This commit is contained in:
		@@ -21,7 +21,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(ChannelPerm.ManageChannel)]
 | 
			
		||||
        [BotPerm(ChannelPerm.ManageChannel)]
 | 
			
		||||
@@ -40,7 +40,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            await Context.OkAsync();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
@@ -77,7 +77,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            Server
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
@@ -111,7 +111,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            Inherit
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
@@ -119,7 +119,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
        public Task Delmsgoncmd(Channel _, State s, ITextChannel ch)
 | 
			
		||||
            => Delmsgoncmd(_, s, ch.Id);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
@@ -143,7 +143,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.DeafenMembers)]
 | 
			
		||||
        [BotPerm(GuildPerm.DeafenMembers)]
 | 
			
		||||
@@ -153,7 +153,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("deafen").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.DeafenMembers)]
 | 
			
		||||
        [BotPerm(GuildPerm.DeafenMembers)]
 | 
			
		||||
@@ -163,7 +163,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("undeafen").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
@@ -173,7 +173,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("delvoich", Format.Bold(voiceChannel.Name)).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
@@ -183,7 +183,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("createvoich", Format.Bold(ch.Name)).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
@@ -193,7 +193,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("deltextchan", Format.Bold(toDelete.Name)).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
@@ -203,7 +203,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("createtextchan", Format.Bold(txtCh.Name)).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
@@ -215,7 +215,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("set_topic").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
@@ -226,7 +226,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("set_channel_name").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
@@ -243,14 +243,14 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("nsfw_set_true").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(ChannelPerm.ManageMessages)]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        public Task Edit(ulong messageId, [Leftover] string text)
 | 
			
		||||
            => Edit((ITextChannel) ctx.Channel, messageId, text);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public async Task Edit(ITextChannel channel, ulong messageId, [Leftover] string text)
 | 
			
		||||
@@ -272,14 +272,14 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            await _service.EditMessage(ctx, channel, messageId, text);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(ChannelPerm.ManageMessages)]
 | 
			
		||||
        [BotPerm(ChannelPerm.ManageMessages)]
 | 
			
		||||
        public Task Delete(ulong messageId, StoopidTime time = null)
 | 
			
		||||
            => Delete((ITextChannel) ctx.Channel, messageId, time);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task Delete(ITextChannel channel, ulong messageId, StoopidTime time = null)
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class AutoAssignRoleCommands : NadekoSubmodule<AutoAssignRoleService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            public async Task AutoAssignRole([Leftover] IRole role)
 | 
			
		||||
@@ -44,7 +44,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            public async Task AutoAssignRole()
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task SqlSelect([Leftover]string sql)
 | 
			
		||||
            {
 | 
			
		||||
@@ -67,42 +67,42 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }, result.Results.Count, 20);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task SqlExec([Leftover]string sql) =>
 | 
			
		||||
                InternalExecSql(sql);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task DeleteWaifus() =>
 | 
			
		||||
                SqlExec(DangerousCommandsService.WaifusDeleteSql);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task DeleteWaifu(IUser user) =>
 | 
			
		||||
                DeleteWaifu(user.Id);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task DeleteWaifu(ulong userId) =>
 | 
			
		||||
                InternalExecSql(DangerousCommandsService.WaifuDeleteSql, userId);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task DeleteCurrency() =>
 | 
			
		||||
                SqlExec(DangerousCommandsService.CurrencyDeleteSql);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task DeletePlaylists() =>
 | 
			
		||||
                SqlExec(DangerousCommandsService.MusicPlaylistDeleteSql);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task DeleteXp() =>
 | 
			
		||||
                SqlExec(DangerousCommandsService.XpDeleteSql);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task PurgeUser(ulong userId)
 | 
			
		||||
            {
 | 
			
		||||
@@ -118,7 +118,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ctx.OkAsync();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task PurgeUser([Leftover]IUser user)
 | 
			
		||||
                => PurgeUser(user.Id);
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
        {
 | 
			
		||||
            // override stats, it should require that the user has managessages guild permission
 | 
			
		||||
            // .po 'stats' add user guild managemessages
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task DiscordPermOverride(CommandOrCrInfo cmd, params GuildPerm[] perms)
 | 
			
		||||
@@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    Format.Code(cmd.Name));
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task DiscordPermOverrideReset()
 | 
			
		||||
@@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("perm_override_all");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task DiscordPermOverrideList(int page = 1)
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class GameChannelCommands : NadekoSubmodule<GameVoiceChannelService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [BotPerm(GuildPerm.MoveMembers)]
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    {"uk-UA", "Українська, Україна"}
 | 
			
		||||
                };
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public async Task LanguageSet()
 | 
			
		||||
@@ -56,7 +56,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    .ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
@@ -85,14 +85,14 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task LanguageSetDefault()
 | 
			
		||||
            {
 | 
			
		||||
                var cul = Localization.DefaultCultureInfo;
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("lang_set_bot_show", cul, cul.NativeName).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task LanguageSetDefault(string name)
 | 
			
		||||
            {
 | 
			
		||||
@@ -119,7 +119,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task LanguagesList()
 | 
			
		||||
            {
 | 
			
		||||
                await ctx.Channel.EmbedAsync(new EmbedBuilder().WithOkColor()
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                Disable
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
@@ -39,7 +39,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("log_disabled").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
@@ -55,7 +55,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("log_not_ignore", Format.Bold(channel.Mention + "(" + channel.Id + ")")).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
@@ -115,7 +115,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
 
 | 
			
		||||
@@ -1,91 +0,0 @@
 | 
			
		||||
//using Discord.Commands;
 | 
			
		||||
//using NadekoBot.Common.Attributes;
 | 
			
		||||
//using NadekoBot.Modules.Administration.Services;
 | 
			
		||||
//using NadekoBot.Extensions;
 | 
			
		||||
//using System;
 | 
			
		||||
//using System.IO;
 | 
			
		||||
//using System.Reflection;
 | 
			
		||||
//using System.Text.RegularExpressions;
 | 
			
		||||
//using System.Threading.Tasks;
 | 
			
		||||
//using System.Linq;
 | 
			
		||||
 | 
			
		||||
//namespace NadekoBot.Modules.Administration
 | 
			
		||||
//{
 | 
			
		||||
//    public partial class Administration
 | 
			
		||||
//    {
 | 
			
		||||
//        [Group]
 | 
			
		||||
//        public class PackagesCommands : NadekoSubmodule<PackagesService>
 | 
			
		||||
//        {
 | 
			
		||||
//            private readonly NadekoBot _bot;
 | 
			
		||||
 | 
			
		||||
//            public PackagesCommands(NadekoBot bot)
 | 
			
		||||
//            {
 | 
			
		||||
//                _bot = bot;
 | 
			
		||||
//            }
 | 
			
		||||
 | 
			
		||||
//            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//            [RequireContext(ContextType.Guild)]
 | 
			
		||||
//            public async Task PackageList()
 | 
			
		||||
//            {
 | 
			
		||||
//                _service.ReloadAvailablePackages();
 | 
			
		||||
//                await Context.Channel.SendConfirmAsync(
 | 
			
		||||
//                    string.Join(
 | 
			
		||||
//                        "\n", 
 | 
			
		||||
//                        _service.Packages
 | 
			
		||||
//                            .Select(x => _bot.LoadedPackages.Contains(x)
 | 
			
		||||
//                                ? "【✘】" + x
 | 
			
		||||
//                                : "【  】" + x)));
 | 
			
		||||
//            }
 | 
			
		||||
 | 
			
		||||
//            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//            [RequireContext(ContextType.Guild)]
 | 
			
		||||
//            [OwnerOnly]
 | 
			
		||||
//            public async Task PackageUnload(string name)
 | 
			
		||||
//            {
 | 
			
		||||
//                if (name.Contains(":") || name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~"))
 | 
			
		||||
//                    return;
 | 
			
		||||
//                name = name.ToTitleCase();
 | 
			
		||||
//                var package = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory,
 | 
			
		||||
//                                                "modules",
 | 
			
		||||
//                                                $"NadekoBot.Modules.{name}",
 | 
			
		||||
//                                                $"NadekoBot.Modules.{name}.dll"));
 | 
			
		||||
                
 | 
			
		||||
//                await _bot.UnloadPackage(name).ConfigureAwait(false);
 | 
			
		||||
//                await ReplyAsync(":ok:");
 | 
			
		||||
//            }
 | 
			
		||||
 | 
			
		||||
//            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//            [RequireContext(ContextType.Guild)]
 | 
			
		||||
//            [OwnerOnly]
 | 
			
		||||
//            public async Task PackageLoad(string name)
 | 
			
		||||
//            {
 | 
			
		||||
//                if (name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~"))
 | 
			
		||||
//                    return;
 | 
			
		||||
//                name = name.ToTitleCase();
 | 
			
		||||
 | 
			
		||||
//                if (await _bot.LoadPackage(name))
 | 
			
		||||
//                    await ReplyAsync(":ok:");
 | 
			
		||||
//                else
 | 
			
		||||
//                    await ReplyAsync(":x:");
 | 
			
		||||
//            }
 | 
			
		||||
 | 
			
		||||
//            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//            [RequireContext(ContextType.Guild)]
 | 
			
		||||
//            [OwnerOnly]
 | 
			
		||||
//            public async Task PackageReload(string name)
 | 
			
		||||
//            {
 | 
			
		||||
//                if (name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~"))
 | 
			
		||||
//                    return;
 | 
			
		||||
//                name = name.ToTitleCase();
 | 
			
		||||
 | 
			
		||||
//                if (await _bot.UnloadPackage(name))
 | 
			
		||||
//                {
 | 
			
		||||
//                    await _bot.LoadPackage(name);
 | 
			
		||||
//                    await ReplyAsync(":ok:");
 | 
			
		||||
//                }
 | 
			
		||||
//                else
 | 
			
		||||
//                    await ReplyAsync(":x:");
 | 
			
		||||
//            }
 | 
			
		||||
//        }
 | 
			
		||||
//    }
 | 
			
		||||
//}
 | 
			
		||||
@@ -31,7 +31,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                return true;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            public async Task MuteRole([Leftover] IRole role = null)
 | 
			
		||||
@@ -55,7 +55,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("mute_role_set").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles | GuildPerm.MuteMembers)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
@@ -76,7 +76,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles | GuildPerm.MuteMembers)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
@@ -99,7 +99,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles | GuildPerm.MuteMembers)]
 | 
			
		||||
            public async Task Unmute(IGuildUser user, [Leftover] string reason = "")
 | 
			
		||||
@@ -115,7 +115,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
@@ -136,7 +136,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
@@ -159,7 +159,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            public async Task ChatUnmute(IGuildUser user, [Leftover] string reason = "")
 | 
			
		||||
@@ -175,7 +175,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.MuteMembers)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
@@ -195,7 +195,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.MuteMembers)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
@@ -217,7 +217,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.MuteMembers)]
 | 
			
		||||
            public async Task VoiceUnmute(IGuildUser user, [Leftover] string reason = "")
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class PlayingRotateCommands : NadekoSubmodule<PlayingRotateService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task RotatePlaying()
 | 
			
		||||
            {
 | 
			
		||||
@@ -22,7 +22,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("ropl_disabled").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task AddPlaying(ActivityType t, [Leftover] string status)
 | 
			
		||||
            {
 | 
			
		||||
@@ -31,7 +31,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("ropl_added").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task ListPlaying()
 | 
			
		||||
            {
 | 
			
		||||
@@ -51,7 +51,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task RemovePlaying(int index)
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class PrefixCommands : NadekoSubmodule
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public async Task PrefixCommand()
 | 
			
		||||
            {
 | 
			
		||||
@@ -22,14 +22,14 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                Set
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public Task PrefixCommand(Set _, [Leftover] string prefix)
 | 
			
		||||
                => PrefixCommand(prefix);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
@@ -44,7 +44,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("prefix_new", Format.Code(oldPrefix), Format.Code(newPrefix)).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task DefPrefix([Leftover]string prefix = null)
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class ProtectionCommands : NadekoSubmodule<ProtectionService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task AntiAlt()
 | 
			
		||||
@@ -31,7 +31,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyErrorLocalizedAsync("protection_not_running", "Anti-Alt");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task AntiAlt(StoopidTime minAge, PunishmentAction action, [Leftover] StoopidTime punishTime = null)
 | 
			
		||||
@@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ctx.OkAsync();
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task AntiAlt(StoopidTime minAge, PunishmentAction action, [Leftover]IRole role)
 | 
			
		||||
@@ -62,7 +62,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ctx.OkAsync();
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public Task AntiRaid()
 | 
			
		||||
@@ -77,7 +77,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
@@ -85,7 +85,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                PunishmentAction action, [Leftover] StoopidTime punishTime)
 | 
			
		||||
                => InternalAntiRaid(userThreshold, seconds, action, punishTime: punishTime);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [Priority(2)]
 | 
			
		||||
@@ -138,7 +138,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                        .ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public Task AntiSpam()
 | 
			
		||||
@@ -153,7 +153,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
@@ -165,14 +165,14 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                return InternalAntiSpam(messageCount, action, null, role);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public Task AntiSpam(int messageCount, PunishmentAction action, [Leftover] StoopidTime punishTime)
 | 
			
		||||
                => InternalAntiSpam(messageCount, action, punishTime, null);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [Priority(2)]
 | 
			
		||||
@@ -203,7 +203,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    $"{ctx.User.Mention} {GetAntiSpamString(stats)}").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task AntispamIgnore()
 | 
			
		||||
@@ -219,7 +219,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync(added.Value ? "spam_ignore" : "spam_not_ignore", "Anti-Spam").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task AntiList()
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            private static readonly TimeSpan twoWeeks = TimeSpan.FromDays(14);
 | 
			
		||||
 | 
			
		||||
            //delets her own messages, no perm required
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Prune(string parameter = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -30,7 +30,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                ctx.Message.DeleteAfter(3);
 | 
			
		||||
            }
 | 
			
		||||
            // prune x
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(ChannelPerm.ManageMessages)]
 | 
			
		||||
            [BotPerm(ChannelPerm.ManageMessages)]
 | 
			
		||||
@@ -50,7 +50,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            //prune @user [x]
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(ChannelPerm.ManageMessages)]
 | 
			
		||||
            [BotPerm(ChannelPerm.ManageMessages)]
 | 
			
		||||
@@ -59,7 +59,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                => Prune(user.Id, count, parameter);
 | 
			
		||||
 | 
			
		||||
            //prune userid [x]
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(ChannelPerm.ManageMessages)]
 | 
			
		||||
            [BotPerm(ChannelPerm.ManageMessages)]
 | 
			
		||||
 
 | 
			
		||||
@@ -106,7 +106,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [NoPublicBot]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -115,7 +115,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            public Task ReactionRoles(params string[] input) =>
 | 
			
		||||
                InternalReactionRoles(false, input);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [NoPublicBot]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -124,7 +124,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            public Task ReactionRoles(Exclude _, params string[] input) =>
 | 
			
		||||
                InternalReactionRoles(true, input);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [NoPublicBot]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -156,7 +156,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [NoPublicBot]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -174,7 +174,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("reaction_role_removed", index + 1).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -198,7 +198,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -218,7 +218,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -243,7 +243,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -268,7 +268,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -281,7 +281,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("cr", Format.Bold(r.Name)).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -296,7 +296,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("dr", Format.Bold(role.Name)).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -314,7 +314,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public async Task RoleColor([Leftover] IRole role)
 | 
			
		||||
@@ -322,7 +322,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ctx.Channel.SendConfirmAsync("Role Color", role.Color.RawValue.ToString("x6")).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class SelfAssignedRolesCommands : NadekoSubmodule<SelfAssignedRolesService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
@@ -32,7 +32,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -40,7 +40,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            public Task Asar([Leftover] IRole role) =>
 | 
			
		||||
                Asar(0, role);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -63,7 +63,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -84,7 +84,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            public async Task Rsar([Leftover] IRole role)
 | 
			
		||||
@@ -104,7 +104,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Lsar(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
@@ -163,7 +163,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }, roles.Count(), 20).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -176,7 +176,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("self_assign_no_excl").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -198,7 +198,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    Format.Bold(level.ToString())).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Iam([Leftover] IRole role)
 | 
			
		||||
            {
 | 
			
		||||
@@ -235,7 +235,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Iamnot([Leftover] IRole role)
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -34,7 +34,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                _coord = coord;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
@@ -67,7 +67,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                        .WithValue(cmdText).WithIsInline(false))).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
@@ -96,7 +96,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("autocmd_add", Format.Code(Format.Sanitize(cmdText)), cmd.Interval).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task StartupCommandsList(int page = 1)
 | 
			
		||||
@@ -129,7 +129,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task AutoCommandsList(int page = 1)
 | 
			
		||||
@@ -167,7 +167,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                return $"[{GetText("interval")}]: {interval}";
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task Wait(int miliseconds)
 | 
			
		||||
            {
 | 
			
		||||
@@ -185,7 +185,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await Task.Delay(miliseconds).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
@@ -200,7 +200,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ctx.OkAsync();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task StartupCommandRemove([Leftover] int index)
 | 
			
		||||
@@ -211,7 +211,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("scrm").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
@@ -222,7 +222,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("startcmds_cleared").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task ForwardMessages()
 | 
			
		||||
            {
 | 
			
		||||
@@ -234,7 +234,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("fwdm_stop").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task ForwardToAll()
 | 
			
		||||
            {
 | 
			
		||||
@@ -247,7 +247,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task ShardStats(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
                if (--page < 0)
 | 
			
		||||
@@ -298,7 +298,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                };
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task RestartShard(int shardId)
 | 
			
		||||
            {
 | 
			
		||||
@@ -313,7 +313,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task Leave([Leftover] string guildStr)
 | 
			
		||||
            {
 | 
			
		||||
@@ -321,7 +321,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task Die()
 | 
			
		||||
            {
 | 
			
		||||
@@ -337,7 +337,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                _coord.Die();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task Restart()
 | 
			
		||||
            {
 | 
			
		||||
@@ -351,7 +351,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                try { await ReplyConfirmLocalizedAsync("restarting").ConfigureAwait(false); } catch { }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task SetName([Leftover] string newName)
 | 
			
		||||
            {
 | 
			
		||||
@@ -370,7 +370,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("bot_name", Format.Bold(newName)).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageNicknames)]
 | 
			
		||||
            [BotPerm(GuildPerm.ChangeNickname)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
@@ -384,7 +384,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("bot_nick", Format.Bold(newNick) ?? "-").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageNicknames)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageNicknames)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
@@ -403,7 +403,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("user_nick", Format.Bold(gu.ToString()), Format.Bold(newNick) ?? "-").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task SetStatus([Leftover] SettableUserStatus status)
 | 
			
		||||
            {
 | 
			
		||||
@@ -412,7 +412,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("bot_status", Format.Bold(status.ToString())).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task SetAvatar([Leftover] string img = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -424,7 +424,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task SetGame(ActivityType type, [Leftover] string game = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -437,7 +437,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("set_game").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task SetStream(string url, [Leftover] string name = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -448,7 +448,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("set_stream").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task Send(string where, [Leftover] string msg = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -514,7 +514,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("message_sent").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task ImagesReload()
 | 
			
		||||
            {
 | 
			
		||||
@@ -522,7 +522,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("images_loading", 0).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task StringsReload()
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class ServerGreetCommands : NadekoSubmodule<GreetSettingsService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            public async Task GreetDel(int timer = 30)
 | 
			
		||||
@@ -28,7 +28,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("greetdel_off").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            public async Task Greet()
 | 
			
		||||
@@ -41,7 +41,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("greet_off").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            public Task GreetMsg()
 | 
			
		||||
@@ -50,7 +50,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                return ReplyConfirmLocalizedAsync("greetmsg_cur", greetMsg?.SanitizeMentions());
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            public async Task GreetMsg([Leftover] string text)
 | 
			
		||||
@@ -68,7 +68,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("greetmsg_enable", $"`{Prefix}greet`").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            public async Task GreetDm()
 | 
			
		||||
@@ -81,7 +81,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("greetdm_off").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            public Task GreetDmMsg()
 | 
			
		||||
@@ -90,7 +90,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                return ReplyConfirmLocalizedAsync("greetdmmsg_cur", dmGreetMsg?.SanitizeMentions());
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            public async Task GreetDmMsg([Leftover] string text = null)
 | 
			
		||||
@@ -108,7 +108,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("greetdmmsg_enable", $"`{Prefix}greetdm`").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            public async Task Bye()
 | 
			
		||||
@@ -121,7 +121,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("bye_off").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            public Task ByeMsg()
 | 
			
		||||
@@ -130,7 +130,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                return ReplyConfirmLocalizedAsync("byemsg_cur", byeMsg?.SanitizeMentions());
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            public async Task ByeMsg([Leftover] string text)
 | 
			
		||||
@@ -148,7 +148,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("byemsg_enable", $"`{Prefix}bye`").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            public async Task ByeDel(int timer = 30)
 | 
			
		||||
@@ -162,7 +162,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            [Ratelimit(5)]
 | 
			
		||||
@@ -178,7 +178,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            [Ratelimit(5)]
 | 
			
		||||
@@ -194,7 +194,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageGuild)]
 | 
			
		||||
            [Ratelimit(5)]
 | 
			
		||||
 
 | 
			
		||||
@@ -1,31 +0,0 @@
 | 
			
		||||
//using NadekoBot.Services;
 | 
			
		||||
//using System;
 | 
			
		||||
//using System.Collections.Generic;
 | 
			
		||||
//using System.IO;
 | 
			
		||||
//using System.Linq;
 | 
			
		||||
//using System.Text.RegularExpressions;
 | 
			
		||||
 | 
			
		||||
//namespace NadekoBot.Modules.Administration.Services
 | 
			
		||||
//{
 | 
			
		||||
//    public class PackagesService : INService
 | 
			
		||||
//    {
 | 
			
		||||
//        public IEnumerable<string> Packages { get; private set; }
 | 
			
		||||
 | 
			
		||||
//        public PackagesService()
 | 
			
		||||
//        {
 | 
			
		||||
//            ReloadAvailablePackages();
 | 
			
		||||
//        }
 | 
			
		||||
 | 
			
		||||
//        public void ReloadAvailablePackages()
 | 
			
		||||
//        {
 | 
			
		||||
//            Packages = Directory.GetDirectories(Path.Combine(Appctx.BaseDirectory, "modules\\"), "NadekoBot.Modules.*", SearchOption.AllDirectories)
 | 
			
		||||
//                   .SelectMany(x => Directory.GetFiles(x, "NadekoBot.Modules.*.dll"))
 | 
			
		||||
//                   .Select(x => Path.GetFileNameWithoutExtension(x))
 | 
			
		||||
//                   .Select(x =>
 | 
			
		||||
//                   {
 | 
			
		||||
//                       var m = Regex.Match(x, @"NadekoBot\.Modules\.(?<name>.*)");
 | 
			
		||||
//                       return m.Groups["name"].Value;
 | 
			
		||||
//                   });
 | 
			
		||||
//        }
 | 
			
		||||
//    }
 | 
			
		||||
//}
 | 
			
		||||
@@ -14,7 +14,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class TimeZoneCommands : NadekoSubmodule<GuildTimezoneService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Timezones(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
@@ -60,14 +60,14 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    timezones.Length, timezonesPerPage).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Timezone()
 | 
			
		||||
            {
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("timezone_guild", _service.GetTimeZoneOrUtc(ctx.Guild.Id)).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task Timezone([Leftover] string id)
 | 
			
		||||
 
 | 
			
		||||
@@ -49,7 +49,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                return true;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            public async Task Warn(IGuildUser user, [Leftover] string reason = null)
 | 
			
		||||
@@ -123,7 +123,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [NadekoOptions(typeof(WarnExpireOptions))]
 | 
			
		||||
@@ -138,7 +138,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("warns_expire_in", expireDays);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [NadekoOptions(typeof(WarnExpireOptions))]
 | 
			
		||||
@@ -169,7 +169,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [Priority(2)]
 | 
			
		||||
@@ -180,7 +180,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                return Warnlog(page, user.Id);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(3)]
 | 
			
		||||
            public Task Warnlog(IGuildUser user = null)
 | 
			
		||||
@@ -190,14 +190,14 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                return ctx.User.Id == user.Id || ((IGuildUser)ctx.User).GuildPermissions.BanMembers ? Warnlog(user.Id) : Task.CompletedTask;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public Task Warnlog(int page, ulong userId)
 | 
			
		||||
                => InternalWarnlog(userId, page - 1);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
@@ -249,7 +249,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }, allWarnings.Length, 9);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            public async Task WarnlogAll(int page = 1)
 | 
			
		||||
@@ -278,13 +278,13 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }, warnings.Length, 15).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            public Task Warnclear(IGuildUser user, int index = 0)
 | 
			
		||||
                => Warnclear(user.Id, index);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            public async Task Warnclear(ulong userId, int index = 0)
 | 
			
		||||
@@ -316,7 +316,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                AddRole
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
@@ -343,7 +343,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            public async Task WarnPunish(int number, PunishmentAction punish, StoopidTime time = null)
 | 
			
		||||
@@ -372,7 +372,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            public async Task WarnPunish(int number)
 | 
			
		||||
@@ -386,7 +386,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    Format.Bold(number.ToString())).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task WarnPunishList()
 | 
			
		||||
            {
 | 
			
		||||
@@ -407,7 +407,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    list).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [BotPerm(GuildPerm.BanMembers)]
 | 
			
		||||
@@ -458,7 +458,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    .ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [BotPerm(GuildPerm.BanMembers)]
 | 
			
		||||
@@ -481,7 +481,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [BotPerm(GuildPerm.BanMembers)]
 | 
			
		||||
@@ -524,7 +524,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    .ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [BotPerm(GuildPerm.BanMembers)]
 | 
			
		||||
@@ -547,7 +547,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ctx.OkAsync();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [BotPerm(GuildPerm.BanMembers)]
 | 
			
		||||
@@ -557,7 +557,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ctx.OkAsync();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [BotPerm(GuildPerm.BanMembers)]
 | 
			
		||||
@@ -565,7 +565,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            public Task BanMessageTest([Leftover] string reason = null)
 | 
			
		||||
                => InternalBanMessageTest(reason, null);
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [BotPerm(GuildPerm.BanMembers)]
 | 
			
		||||
@@ -603,7 +603,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [BotPerm(GuildPerm.BanMembers)]
 | 
			
		||||
@@ -622,7 +622,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await UnbanInternal(bun.User).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [BotPerm(GuildPerm.BanMembers)]
 | 
			
		||||
@@ -648,14 +648,14 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("unbanned_user", Format.Bold(user.ToString())).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.KickMembers | GuildPerm.ManageMessages)]
 | 
			
		||||
            [BotPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            public Task Softban(IGuildUser user, [Leftover] string msg = null)
 | 
			
		||||
                => SoftbanInternal(user, msg);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.KickMembers | GuildPerm.ManageMessages)]
 | 
			
		||||
            [BotPerm(GuildPerm.BanMembers)]
 | 
			
		||||
@@ -702,7 +702,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    .ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.KickMembers)]
 | 
			
		||||
            [BotPerm(GuildPerm.KickMembers)]
 | 
			
		||||
@@ -710,7 +710,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            public Task Kick(IGuildUser user, [Leftover] string msg = null)
 | 
			
		||||
                => KickInternal(user, msg);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.KickMembers)]
 | 
			
		||||
            [BotPerm(GuildPerm.KickMembers)]
 | 
			
		||||
@@ -757,7 +757,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                    .ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.BanMembers)]
 | 
			
		||||
            [BotPerm(GuildPerm.BanMembers)]
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class VcRoleCommands : NadekoSubmodule<VcRoleService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
@@ -31,7 +31,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
@@ -61,7 +61,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task VcRoleList()
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,7 @@ namespace NadekoBot.Modules.CustomReactions
 | 
			
		||||
        private bool AdminInGuildOrOwnerInDm() => (ctx.Guild is null && _creds.IsOwner(ctx.User))
 | 
			
		||||
                                                  || (ctx.Guild != null && ((IGuildUser)ctx.User).GuildPermissions.Administrator);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task AddCustReact(string key, [Leftover] string message)
 | 
			
		||||
        {
 | 
			
		||||
            var channel = ctx.Channel as ITextChannel;
 | 
			
		||||
@@ -49,7 +49,7 @@ namespace NadekoBot.Modules.CustomReactions
 | 
			
		||||
                ).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task EditCustReact(kwum id, [Leftover] string message)
 | 
			
		||||
        {
 | 
			
		||||
            var channel = ctx.Channel as ITextChannel;
 | 
			
		||||
@@ -78,7 +78,7 @@ namespace NadekoBot.Modules.CustomReactions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public async Task ListCustReact(int page = 1)
 | 
			
		||||
        {
 | 
			
		||||
@@ -119,7 +119,7 @@ namespace NadekoBot.Modules.CustomReactions
 | 
			
		||||
            All
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        public async Task ListCustReact(All _)
 | 
			
		||||
        {
 | 
			
		||||
@@ -127,14 +127,14 @@ namespace NadekoBot.Modules.CustomReactions
 | 
			
		||||
            await CrsExport();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task ListCustReactG(int page = 1)
 | 
			
		||||
        {
 | 
			
		||||
            await ReplyPendingLocalizedAsync("obsolete_use", Format.Code($"{Prefix}crsexport"));
 | 
			
		||||
            await CrsExport();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task ShowCustReact(kwum id)
 | 
			
		||||
        {
 | 
			
		||||
            var found = _service.GetCustomReaction(ctx.Guild?.Id, (int)id);
 | 
			
		||||
@@ -154,7 +154,7 @@ namespace NadekoBot.Modules.CustomReactions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task DelCustReact(kwum id)
 | 
			
		||||
        {
 | 
			
		||||
            if (!AdminInGuildOrOwnerInDm())
 | 
			
		||||
@@ -179,7 +179,7 @@ namespace NadekoBot.Modules.CustomReactions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task CrReact(kwum id, params string[] emojiStrs)
 | 
			
		||||
        {
 | 
			
		||||
            if (!AdminInGuildOrOwnerInDm())
 | 
			
		||||
@@ -234,23 +234,23 @@ namespace NadekoBot.Modules.CustomReactions
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public Task CrCa(kwum id)
 | 
			
		||||
            => InternalCrEdit(id, CustomReactionsService.CrField.ContainsAnywhere);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public Task CrDm(kwum id)
 | 
			
		||||
            => InternalCrEdit(id, CustomReactionsService.CrField.DmResponse);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public Task CrAd(kwum id)
 | 
			
		||||
            => InternalCrEdit(id, CustomReactionsService.CrField.AutoDelete);
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public Task CrAt(kwum id)
 | 
			
		||||
            => InternalCrEdit(id, CustomReactionsService.CrField.AllowTarget);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        public async Task CrsReload()
 | 
			
		||||
        {
 | 
			
		||||
@@ -284,7 +284,7 @@ namespace NadekoBot.Modules.CustomReactions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
        public async Task CrClear()
 | 
			
		||||
@@ -298,7 +298,7 @@ namespace NadekoBot.Modules.CustomReactions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task CrsExport()
 | 
			
		||||
        {
 | 
			
		||||
            if (!AdminInGuildOrOwnerInDm())
 | 
			
		||||
@@ -314,7 +314,7 @@ namespace NadekoBot.Modules.CustomReactions
 | 
			
		||||
            await ctx.Channel.SendFileAsync(stream, "crs-export.yml", text: null);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
#if GLOBAL_NADEKO
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
 | 
			
		||||
            private IUserMessage raceMessage = null;
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [NadekoOptionsAttribute(typeof(RaceOptions))]
 | 
			
		||||
            public Task Race(params string[] args)
 | 
			
		||||
@@ -136,7 +136,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                return ReplyErrorLocalizedAsync("animal_race_failed");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task JoinRace(ShmartNumber amount = default)
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                _db = db;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task BlackJack(ShmartNumber amount)
 | 
			
		||||
            {
 | 
			
		||||
@@ -157,15 +157,15 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                return $"{playerName} | Bet: {x.Bet}\n";
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public Task Hit() => InternalBlackJack(BjAction.Hit);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public Task Stand() => InternalBlackJack(BjAction.Stand);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public Task Double() => InternalBlackJack(BjAction.Double);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                _cs = cs;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [NadekoOptionsAttribute(typeof(Connect4Game.Options))]
 | 
			
		||||
            public async Task Connect4(params string[] args)
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            {
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [NadekoOptionsAttribute(typeof(EventOptions))]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
 
 | 
			
		||||
@@ -20,13 +20,13 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            {
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public Task RaffleCur(Mixed _, ShmartNumber amount) =>
 | 
			
		||||
                RaffleCur(amount, true);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public async Task RaffleCur(ShmartNumber amount, bool mixed = false)
 | 
			
		||||
 
 | 
			
		||||
@@ -31,7 +31,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                _images = data.LocalImages;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Roll()
 | 
			
		||||
            {
 | 
			
		||||
                var rng = new NadekoRandom();
 | 
			
		||||
@@ -51,7 +51,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public async Task Roll(int num)
 | 
			
		||||
            {
 | 
			
		||||
@@ -59,21 +59,21 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public async Task Rolluo(int num = 1)
 | 
			
		||||
            {
 | 
			
		||||
                await InternalRoll(num, false).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public async Task Roll(string arg)
 | 
			
		||||
            {
 | 
			
		||||
                await InternallDndRoll(arg, true).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public async Task Rolluo(string arg)
 | 
			
		||||
            {
 | 
			
		||||
@@ -184,7 +184,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task NRoll([Leftover] string range)
 | 
			
		||||
            {
 | 
			
		||||
                int rolled;
 | 
			
		||||
 
 | 
			
		||||
@@ -72,7 +72,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Draw(int num = 1)
 | 
			
		||||
            {
 | 
			
		||||
@@ -88,7 +88,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task DrawNew(int num = 1)
 | 
			
		||||
            {
 | 
			
		||||
                if (num < 1)
 | 
			
		||||
@@ -103,7 +103,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task DeckShuffle()
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -33,7 +33,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                _db = db;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Flip(int count = 1)
 | 
			
		||||
            {
 | 
			
		||||
                if (count > 10 || count < 1)
 | 
			
		||||
@@ -85,7 +85,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                Tails = 2
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Betflip(ShmartNumber amount, BetFlipGuess guess)
 | 
			
		||||
            {
 | 
			
		||||
                if (!await CheckBetMandatory(amount).ConfigureAwait(false) || amount == 1)
 | 
			
		||||
 
 | 
			
		||||
@@ -54,7 +54,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Economy()
 | 
			
		||||
        {
 | 
			
		||||
            var ec = _service.GetEconomy();
 | 
			
		||||
@@ -77,7 +77,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Timely()
 | 
			
		||||
        {
 | 
			
		||||
            var val = _config.Timely.Amount;
 | 
			
		||||
@@ -100,7 +100,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("timely", n(val) + CurrencySign, period).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        public async Task TimelyReset()
 | 
			
		||||
        {
 | 
			
		||||
@@ -108,7 +108,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("timely_reset").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        public async Task TimelySet(int amount, int period = 24)
 | 
			
		||||
        {
 | 
			
		||||
@@ -127,7 +127,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("timely_set", Format.Bold(n(amount) + CurrencySign), Format.Bold(period.ToString())).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task Raffle([Leftover] IRole role = null)
 | 
			
		||||
        {
 | 
			
		||||
@@ -143,7 +143,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            await ctx.Channel.SendConfirmAsync("🎟 " + GetText("raffled_user"), $"**{usr.Username}#{usr.Discriminator}**", footer: $"ID: {usr.Id}").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task RaffleAny([Leftover] IRole role = null)
 | 
			
		||||
        {
 | 
			
		||||
@@ -159,7 +159,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            await ctx.Channel.SendConfirmAsync("🎟 " + GetText("raffled_user"), $"**{usr.Username}#{usr.Discriminator}**", footer: $"ID: {usr.Id}").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public async Task Cash([Leftover] IUser user = null)
 | 
			
		||||
        {
 | 
			
		||||
@@ -167,18 +167,18 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            await ConfirmLocalizedAsync("has", Format.Bold(user.ToString()), $"{GetCurrency(user.Id)} {CurrencySign}").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [Priority(2)]
 | 
			
		||||
        public Task CurrencyTransactions(int page = 1) =>
 | 
			
		||||
            InternalCurrencyTransactions(ctx.User.Id, page);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        public Task CurrencyTransactions([Leftover] IUser usr) =>
 | 
			
		||||
            InternalCurrencyTransactions(usr.Id, 1);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public Task CurrencyTransactions(IUser usr, int page) =>
 | 
			
		||||
@@ -213,14 +213,14 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        public async Task Cash(ulong userId)
 | 
			
		||||
        {
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("has", Format.Code(userId.ToString()), $"{GetCurrency(userId)} {CurrencySign}").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        public async Task Give(ShmartNumber amount, IGuildUser receiver, [Leftover] string msg = null)
 | 
			
		||||
@@ -238,27 +238,27 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                .ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public Task Give(ShmartNumber amount, [Leftover] IGuildUser receiver)
 | 
			
		||||
            => Give(amount, receiver, null);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        public Task Award(ShmartNumber amount, IGuildUser usr, [Leftover] string msg) =>
 | 
			
		||||
            Award(amount, usr.Id, msg);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public Task Award(ShmartNumber amount, [Leftover] IGuildUser usr) =>
 | 
			
		||||
            Award(amount, usr.Id);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        [Priority(2)]
 | 
			
		||||
        public async Task Award(ShmartNumber amount, ulong usrId, [Leftover] string msg = null)
 | 
			
		||||
@@ -273,7 +273,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("awarded", n(amount) + CurrencySign, $"<@{usrId}>").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        [Priority(2)]
 | 
			
		||||
@@ -295,7 +295,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                Format.Bold(role.Name)).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
@@ -315,7 +315,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                Format.Bold(role.Name)).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
@@ -332,7 +332,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        public async Task Take(ShmartNumber amount, [Leftover] ulong usrId)
 | 
			
		||||
        {
 | 
			
		||||
@@ -348,7 +348,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
 | 
			
		||||
        private IUserMessage rdMsg = null;
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task RollDuel(IUser u)
 | 
			
		||||
        {
 | 
			
		||||
@@ -363,7 +363,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task RollDuel(ShmartNumber amount, IUser u)
 | 
			
		||||
        {
 | 
			
		||||
@@ -488,17 +488,17 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            await ctx.Channel.SendConfirmAsync(str).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public Task BetRoll(ShmartNumber amount)
 | 
			
		||||
            => InternallBetroll(amount);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [NadekoOptions(typeof(LbOpts))]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        public Task Leaderboard(params string[] args)
 | 
			
		||||
            => Leaderboard(1, args);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [NadekoOptions(typeof(LbOpts))]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public async Task Leaderboard(int page = 1, params string[] args)
 | 
			
		||||
@@ -598,7 +598,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            Draw,
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Rps(RpsPick pick, ShmartNumber amount = default)
 | 
			
		||||
        {
 | 
			
		||||
            long oldAmount = amount;
 | 
			
		||||
 
 | 
			
		||||
@@ -76,7 +76,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                }, entries.Count, 9, true);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public Task Shop(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
@@ -86,7 +86,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                return ShopInternalAsync(page);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Buy(int index)
 | 
			
		||||
            {
 | 
			
		||||
@@ -219,7 +219,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            private static long GetProfitAmount(int price) =>
 | 
			
		||||
                (int)(Math.Ceiling(0.90 * price));
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
@@ -249,7 +249,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                    .WithTitle(GetText("shop_item_add"))).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task ShopAdd(List _, int price, [Leftover]string name)
 | 
			
		||||
@@ -277,7 +277,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                    .WithTitle(GetText("shop_item_add"))).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task ShopListAdd(int index, [Leftover] string itemText)
 | 
			
		||||
@@ -316,7 +316,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("shop_list_item_added").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task ShopRemove(int index)
 | 
			
		||||
@@ -348,7 +348,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                        .WithTitle(GetText("shop_item_rm"))).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task ShopChangePrice(int index, int price)
 | 
			
		||||
@@ -368,7 +368,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task ShopChangeName(int index, [Leftover] string newName)
 | 
			
		||||
@@ -388,7 +388,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task ShopSwap(int index1, int index2)
 | 
			
		||||
@@ -408,7 +408,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task ShopMove(int fromIndex, int toIndex)
 | 
			
		||||
 
 | 
			
		||||
@@ -87,7 +87,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task SlotStats()
 | 
			
		||||
            {
 | 
			
		||||
@@ -108,7 +108,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task SlotTest(int tests = 1000)
 | 
			
		||||
            {
 | 
			
		||||
@@ -137,7 +137,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                    footer: $"Total Bet: {tests * bet} | Payout: {payout * bet} | {payout * 1.0f / tests * 100}%").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Slot(ShmartNumber amount)
 | 
			
		||||
            {
 | 
			
		||||
                if (!_runningUsers.Add(ctx.User.Id))
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            {
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task WaifuReset()
 | 
			
		||||
            {
 | 
			
		||||
                var price = _service.GetResetPrice(ctx.User);
 | 
			
		||||
@@ -40,7 +40,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                await ReplyErrorLocalizedAsync("waifu_reset_fail");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task WaifuClaim(int amount, [Leftover]IUser target)
 | 
			
		||||
            {
 | 
			
		||||
@@ -78,7 +78,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                await ctx.Channel.SendConfirmAsync(ctx.User.Mention + msg);
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public async Task WaifuTransfer(ulong waifuId, IUser newOwner)
 | 
			
		||||
@@ -96,7 +96,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                    Format.Bold(newOwner.ToString()));
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public async Task WaifuTransfer(IUser waifu, IUser newOwner)
 | 
			
		||||
@@ -113,7 +113,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                    Format.Bold(newOwner.ToString()));
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(-1)]
 | 
			
		||||
            public Task Divorce([Leftover] string target)
 | 
			
		||||
@@ -127,13 +127,13 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                return Divorce(waifuUserId);
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public Task Divorce([Leftover]IGuildUser target) 
 | 
			
		||||
                => Divorce(target.Id);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public async Task Divorce([Leftover]ulong targetId)
 | 
			
		||||
@@ -163,7 +163,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Affinity([Leftover]IGuildUser u = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -201,7 +201,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task WaifuLb(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
@@ -235,7 +235,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                await ctx.Channel.EmbedAsync(embed);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public Task WaifuInfo([Leftover]IUser target = null)
 | 
			
		||||
@@ -246,7 +246,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                return InternalWaifuInfo(target.Id, target.ToString());
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public Task WaifuInfo(ulong targetId)
 | 
			
		||||
@@ -301,7 +301,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                return ctx.Channel.EmbedAsync(embed);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public async Task WaifuGift(int page = 1)
 | 
			
		||||
@@ -326,7 +326,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                }, waifuItems.Count, 9);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public async Task WaifuGift(string itemName, [Leftover] IUser waifu)
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                _db = db;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task WheelOfFortune(ShmartNumber amount)
 | 
			
		||||
            {
 | 
			
		||||
                if (!await CheckBetMandatory(amount).ConfigureAwait(false))
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                _client = client;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [NadekoOptions(typeof(AcrophobiaGame.Options))]
 | 
			
		||||
            public async Task Acrophobia(params string[] args)
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                _db = db;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            public async Task Cleverbot()
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
            _httpFactory = factory;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Choose([Leftover] string list = null)
 | 
			
		||||
        {
 | 
			
		||||
            if (string.IsNullOrWhiteSpace(list))
 | 
			
		||||
@@ -41,7 +41,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
            await ctx.Channel.SendConfirmAsync("🤔", listArr[rng.Next(0, listArr.Length)]).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task EightBall([Leftover] string question = null)
 | 
			
		||||
        {
 | 
			
		||||
            if (string.IsNullOrWhiteSpace(question))
 | 
			
		||||
@@ -54,7 +54,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                .AddField("🎱 " + GetText("8ball"), res, false));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task RateGirl([Leftover] IGuildUser usr)
 | 
			
		||||
        {
 | 
			
		||||
@@ -149,7 +149,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
            return new GirlRating(_images, _httpFactory, crazy, hot, roll, advice);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Linux(string guhnoo, string loonix)
 | 
			
		||||
        {
 | 
			
		||||
            await ctx.Channel.SendConfirmAsync(
 | 
			
		||||
 
 | 
			
		||||
@@ -23,14 +23,14 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                _client = client;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Hangmanlist()
 | 
			
		||||
            {
 | 
			
		||||
                await ctx.Channel.SendConfirmAsync(Format.Code(GetText("hangman_types", Prefix)) + "\n" + string.Join("\n", _service.TermPool.Data.Keys)).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Hangman([Leftover]string type = "random")
 | 
			
		||||
            {
 | 
			
		||||
@@ -129,7 +129,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                                    footer: string.Join(" ", game.PreviousGuesses));
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task HangmanStop()
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                _client = client;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Nunchi()
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                this.logService = logService;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Pick(string pass = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Plant(int amount = 1, string pass = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -78,7 +78,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
#if GLOBAL_NADEKO
 | 
			
		||||
@@ -97,7 +97,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                _client = client;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Poll([Leftover] string arg)
 | 
			
		||||
@@ -56,7 +56,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task PollStats()
 | 
			
		||||
@@ -67,7 +67,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                await ctx.Channel.EmbedAsync(GetStats(pr.Poll, GetText("current_poll_results"))).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Pollend()
 | 
			
		||||
 
 | 
			
		||||
@@ -27,7 +27,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                _client = client;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [NadekoOptionsAttribute(typeof(TypingGame.Options))]
 | 
			
		||||
            public async Task TypeStart(params string[] args)
 | 
			
		||||
@@ -50,7 +50,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task TypeStop()
 | 
			
		||||
            {
 | 
			
		||||
@@ -64,7 +64,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task Typeadd([Leftover] string text)
 | 
			
		||||
@@ -78,7 +78,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                await channel.SendConfirmAsync("Added new article for typing game.").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Typelist(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
@@ -99,7 +99,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                             .ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task Typedel(int index)
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                _client = client;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [NadekoOptions(typeof(TicTacToe.Options))]
 | 
			
		||||
            public async Task TicTacToe(params string[] args)
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                _client = client;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            [NadekoOptionsAttribute(typeof(TriviaOptions))]
 | 
			
		||||
@@ -67,7 +67,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                    .ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Tl()
 | 
			
		||||
            {
 | 
			
		||||
@@ -82,7 +82,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
                await ReplyErrorLocalizedAsync("trivia_none").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Tq()
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -78,7 +78,7 @@ namespace NadekoBot.Modules.Help
 | 
			
		||||
            return (embed.PlainText, embed.ToEmbed());
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Modules(int page = 1)
 | 
			
		||||
        {
 | 
			
		||||
            if (--page < 0)
 | 
			
		||||
@@ -149,7 +149,7 @@ namespace NadekoBot.Modules.Help
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [NadekoOptions(typeof(CommandsOptions))]
 | 
			
		||||
        public async Task Commands(string module = null, params string[] args)
 | 
			
		||||
        {
 | 
			
		||||
@@ -244,7 +244,7 @@ namespace NadekoBot.Modules.Help
 | 
			
		||||
            await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        public async Task H([Leftover] string fail)
 | 
			
		||||
        {
 | 
			
		||||
@@ -258,7 +258,7 @@ namespace NadekoBot.Modules.Help
 | 
			
		||||
            await ReplyErrorLocalizedAsync("command_not_found").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public async Task H([Leftover] CommandInfo com = null)
 | 
			
		||||
        {
 | 
			
		||||
@@ -289,7 +289,7 @@ namespace NadekoBot.Modules.Help
 | 
			
		||||
            await channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        public async Task GenCmdList()
 | 
			
		||||
        {
 | 
			
		||||
@@ -397,7 +397,7 @@ namespace NadekoBot.Modules.Help
 | 
			
		||||
            await ctx.Channel.SendFileAsync(rDataStream, "cmds.json", GetText("commandlist_regen")).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Guide()
 | 
			
		||||
        {
 | 
			
		||||
            await ConfirmLocalizedAsync("guide",
 | 
			
		||||
@@ -405,7 +405,7 @@ namespace NadekoBot.Modules.Help
 | 
			
		||||
                "http://nadekobot.readthedocs.io/en/latest/").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Donate()
 | 
			
		||||
        {
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("donate", PatreonUrl, PaypalUrl).ConfigureAwait(false);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,717 +0,0 @@
 | 
			
		||||
// using Discord;
 | 
			
		||||
// using Discord.Audio;
 | 
			
		||||
// using System;
 | 
			
		||||
// using System.Threading;
 | 
			
		||||
// using System.Threading.Tasks;
 | 
			
		||||
// using System.Linq;
 | 
			
		||||
// using System.Runtime.InteropServices;
 | 
			
		||||
// using NadekoBot.Extensions;
 | 
			
		||||
// using NadekoBot.Common.Collections;
 | 
			
		||||
// using NadekoBot.Modules.Music.Services;
 | 
			
		||||
// using NadekoBot.Services;
 | 
			
		||||
// using NadekoBot.Services.Database.Models;
 | 
			
		||||
// using Discord.WebSocket;
 | 
			
		||||
// using Serilog;
 | 
			
		||||
//
 | 
			
		||||
// namespace NadekoBot.Modules.Music.Common
 | 
			
		||||
// {
 | 
			
		||||
//     public enum StreamState
 | 
			
		||||
//     {
 | 
			
		||||
//         Resolving,
 | 
			
		||||
//         Queued,
 | 
			
		||||
//         Playing,
 | 
			
		||||
//         Completed
 | 
			
		||||
//     }
 | 
			
		||||
//     public class MusicPlayer
 | 
			
		||||
//     {
 | 
			
		||||
//         private readonly Thread _player;
 | 
			
		||||
//         public IVoiceChannel VoiceChannel { get; private set; }
 | 
			
		||||
//
 | 
			
		||||
//         public ITextChannel OriginalTextChannel { get; set; }
 | 
			
		||||
//         
 | 
			
		||||
//         private MusicQueue Queue { get; } = new MusicQueue();
 | 
			
		||||
//
 | 
			
		||||
//         public bool Exited { get; set; } = false;
 | 
			
		||||
//         public bool Stopped { get; private set; } = false;
 | 
			
		||||
//         public float Volume { get; private set; } = 1.0f;
 | 
			
		||||
//         public bool Paused => PauseTaskSource != null;
 | 
			
		||||
//         private TaskCompletionSource<bool> PauseTaskSource { get; set; } = null;
 | 
			
		||||
//
 | 
			
		||||
//         public string PrettyVolume => $"🔉 {(int)(Volume * 100)}%";
 | 
			
		||||
//         public string PrettyCurrentTime
 | 
			
		||||
//         {
 | 
			
		||||
//             get
 | 
			
		||||
//             {
 | 
			
		||||
//                 var time = CurrentTime.ToString(@"mm\:ss");
 | 
			
		||||
//                 var hrs = (int)CurrentTime.TotalHours;
 | 
			
		||||
//
 | 
			
		||||
//                 if (hrs > 0)
 | 
			
		||||
//                     return hrs + ":" + time;
 | 
			
		||||
//                 else
 | 
			
		||||
//                     return time;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//         public string PrettyFullTime => PrettyCurrentTime + " / " + (Queue.Current.Song?.PrettyTotalTime ?? "?");
 | 
			
		||||
//         private CancellationTokenSource SongCancelSource { get; set; }
 | 
			
		||||
//         public ITextChannel OutputTextChannel { get; set; }
 | 
			
		||||
//         public (int Index, SongInfo Current) Current
 | 
			
		||||
//         {
 | 
			
		||||
//             get
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (Stopped)
 | 
			
		||||
//                     return (0, null);
 | 
			
		||||
//                 return Queue.Current;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public bool RepeatCurrentSong { get; private set; }
 | 
			
		||||
//         public bool Shuffle { get; private set; }
 | 
			
		||||
//         public bool Autoplay { get; private set; }
 | 
			
		||||
//         public bool RepeatPlaylist { get; private set; } = false;
 | 
			
		||||
//         public uint MaxQueueSize
 | 
			
		||||
//         {
 | 
			
		||||
//             get => Queue.MaxQueueSize;
 | 
			
		||||
//             set { lock (locker) Queue.MaxQueueSize = value; }
 | 
			
		||||
//         }
 | 
			
		||||
//         private bool _fairPlay;
 | 
			
		||||
//         public bool FairPlay
 | 
			
		||||
//         {
 | 
			
		||||
//             get => _fairPlay;
 | 
			
		||||
//             set
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (value)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     var (Index, Song) = Queue.Current;
 | 
			
		||||
//                     if (Song != null)
 | 
			
		||||
//                         RecentlyPlayedUsers.Add(Song.QueuerName);
 | 
			
		||||
//                 }
 | 
			
		||||
//                 else
 | 
			
		||||
//                 {
 | 
			
		||||
//                     RecentlyPlayedUsers.Clear();
 | 
			
		||||
//                 }
 | 
			
		||||
//
 | 
			
		||||
//                 _fairPlay = value;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//         public bool AutoDelete { get; set; }
 | 
			
		||||
//         public uint MaxPlaytimeSeconds { get; set; }
 | 
			
		||||
//
 | 
			
		||||
//
 | 
			
		||||
//         const int _frameBytes = 3840;
 | 
			
		||||
//         const float _miliseconds = 20.0f;
 | 
			
		||||
//         public TimeSpan CurrentTime => TimeSpan.FromSeconds(_bytesSent / (float)_frameBytes / (1000 / _miliseconds));
 | 
			
		||||
//
 | 
			
		||||
//         private int _bytesSent = 0;
 | 
			
		||||
//
 | 
			
		||||
//         private IAudioClient _audioClient;
 | 
			
		||||
//         private readonly object locker = new object();
 | 
			
		||||
//         private MusicService _musicService;
 | 
			
		||||
//
 | 
			
		||||
//         #region events
 | 
			
		||||
//         public event Action<MusicPlayer, (int Index, SongInfo Song)> OnStarted;
 | 
			
		||||
//         public event Action<MusicPlayer, SongInfo> OnCompleted;
 | 
			
		||||
//         public event Action<MusicPlayer, bool> OnPauseChanged;
 | 
			
		||||
//         #endregion
 | 
			
		||||
//
 | 
			
		||||
//         private bool manualSkip = false;
 | 
			
		||||
//         private bool manualIndex = false;
 | 
			
		||||
//         private bool newVoiceChannel = false;
 | 
			
		||||
//         private readonly IGoogleApiService _google;
 | 
			
		||||
//
 | 
			
		||||
//         private bool cancel = false;
 | 
			
		||||
//
 | 
			
		||||
//         private ConcurrentHashSet<string> RecentlyPlayedUsers { get; } = new ConcurrentHashSet<string>();
 | 
			
		||||
//         public TimeSpan TotalPlaytime
 | 
			
		||||
//         {
 | 
			
		||||
//             get
 | 
			
		||||
//             {
 | 
			
		||||
//                 var songs = Queue.ToArray().Songs;
 | 
			
		||||
//                 return songs.Any(s => s.TotalTime == TimeSpan.MaxValue)
 | 
			
		||||
//                     ? TimeSpan.MaxValue
 | 
			
		||||
//                     : new TimeSpan(songs.Sum(s => s.TotalTime.Ticks));
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public MusicPlayer(MusicService musicService, MusicSettings ms, IGoogleApiService google,
 | 
			
		||||
//             IVoiceChannel vch, ITextChannel original, float volume)
 | 
			
		||||
//         {
 | 
			
		||||
//             this.Volume = volume;
 | 
			
		||||
//             this.VoiceChannel = vch;
 | 
			
		||||
//             this.OriginalTextChannel = original;
 | 
			
		||||
//             this.SongCancelSource = new CancellationTokenSource();
 | 
			
		||||
//             if (ms.MusicChannelId is ulong cid)
 | 
			
		||||
//             {
 | 
			
		||||
//                 this.OutputTextChannel = ((SocketGuild)original.Guild).GetTextChannel(cid) ?? original;
 | 
			
		||||
//             }
 | 
			
		||||
//             else
 | 
			
		||||
//             {
 | 
			
		||||
//                 this.OutputTextChannel = original;
 | 
			
		||||
//             }
 | 
			
		||||
//             this._musicService = musicService;
 | 
			
		||||
//             this.AutoDelete = ms.SongAutoDelete;
 | 
			
		||||
//             this._google = google;
 | 
			
		||||
//
 | 
			
		||||
//             _player = new Thread(new ThreadStart(PlayerLoop))
 | 
			
		||||
//             {
 | 
			
		||||
//                 Priority = ThreadPriority.AboveNormal
 | 
			
		||||
//             };
 | 
			
		||||
//             _player.Start();
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         private async void PlayerLoop()
 | 
			
		||||
//         {
 | 
			
		||||
//             while (!Exited)
 | 
			
		||||
//             {
 | 
			
		||||
//                 _bytesSent = 0;
 | 
			
		||||
//                 cancel = false;
 | 
			
		||||
//                 CancellationToken cancelToken;
 | 
			
		||||
//                 (int Index, SongInfo Song) data;
 | 
			
		||||
//                 lock (locker)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     data = Queue.Current;
 | 
			
		||||
//                     cancelToken = SongCancelSource.Token;
 | 
			
		||||
//                     manualSkip = false;
 | 
			
		||||
//                     manualIndex = false;
 | 
			
		||||
//                 }
 | 
			
		||||
//                 if (data.Song != null)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     Log.Information("Starting");
 | 
			
		||||
//                     AudioOutStream pcm = null;
 | 
			
		||||
//                     SongBuffer b = null;
 | 
			
		||||
//                     try
 | 
			
		||||
//                     {
 | 
			
		||||
//                         var streamUrl = await data.Song.Uri().ConfigureAwait(false);
 | 
			
		||||
//                         b = new SongBuffer(streamUrl, data.Song.ProviderType == MusicType.Local);
 | 
			
		||||
//                         //Log.Information("Created buffer, buffering...");
 | 
			
		||||
//
 | 
			
		||||
//                         //var bufferTask = b.StartBuffering(cancelToken);
 | 
			
		||||
//                         //var timeout = Task.Delay(10000);
 | 
			
		||||
//                         //if (Task.WhenAny(bufferTask, timeout) == timeout)
 | 
			
		||||
//                         //{
 | 
			
		||||
//                         //    Log.Information("Buffering failed due to a timeout.");
 | 
			
		||||
//                         //    continue;
 | 
			
		||||
//                         //}
 | 
			
		||||
//                         //else if (!bufferTask.Result)
 | 
			
		||||
//                         //{
 | 
			
		||||
//                         //    Log.Information("Buffering failed due to a cancel or error.");
 | 
			
		||||
//                         //    continue;
 | 
			
		||||
//                         //}
 | 
			
		||||
//                         //Log.Information("Buffered. Getting audio client...");
 | 
			
		||||
//                         var ac = await GetAudioClient().ConfigureAwait(false);
 | 
			
		||||
//                         Log.Information("Got Audio client");
 | 
			
		||||
//                         if (ac is null)
 | 
			
		||||
//                         {
 | 
			
		||||
//                             Log.Information("Can't join");
 | 
			
		||||
//                             await Task.Delay(900, cancelToken).ConfigureAwait(false);
 | 
			
		||||
//                             // just wait some time, maybe bot doesn't even have perms to join that voice channel,
 | 
			
		||||
//                             // i don't want to spam connection attempts
 | 
			
		||||
//                             continue;
 | 
			
		||||
//                         }
 | 
			
		||||
//                         b.StartBuffering();
 | 
			
		||||
//                         await Task.WhenAny(Task.Delay(10000), b.PrebufferingCompleted.Task).ConfigureAwait(false);
 | 
			
		||||
//                         pcm = ac.CreatePCMStream(AudioApplication.Music, bufferMillis: 1, packetLoss: 5);
 | 
			
		||||
//                         Log.Information("Created pcm stream");
 | 
			
		||||
//                         OnStarted?.Invoke(this, data);
 | 
			
		||||
//
 | 
			
		||||
//                         while (MaxPlaytimeSeconds <= 0 || MaxPlaytimeSeconds >= CurrentTime.TotalSeconds)
 | 
			
		||||
//                         {
 | 
			
		||||
//                             var buffer = b.Read(3840);
 | 
			
		||||
//                             if (buffer.Length == 0)
 | 
			
		||||
//                                 break;
 | 
			
		||||
//                             AdjustVolume(buffer, Volume);
 | 
			
		||||
//                             await pcm.WriteAsync(buffer, 0, buffer.Length, cancelToken).ConfigureAwait(false);
 | 
			
		||||
//                             unchecked { _bytesSent += buffer.Length; }
 | 
			
		||||
//
 | 
			
		||||
//                             await (PauseTaskSource?.Task ?? Task.CompletedTask).ConfigureAwait(false);
 | 
			
		||||
//                         }
 | 
			
		||||
//                     }
 | 
			
		||||
//                     catch (OperationCanceledException)
 | 
			
		||||
//                     {
 | 
			
		||||
//                         Log.Information("Song Canceled");
 | 
			
		||||
//                         cancel = true;
 | 
			
		||||
//                     }
 | 
			
		||||
//                     catch (Exception ex)
 | 
			
		||||
//                     {
 | 
			
		||||
//                         Log.Warning(ex, "Error sending song data");
 | 
			
		||||
//                     }
 | 
			
		||||
//                     finally
 | 
			
		||||
//                     {
 | 
			
		||||
//                         if (pcm != null)
 | 
			
		||||
//                         {
 | 
			
		||||
//                             // flush is known to get stuck from time to time,
 | 
			
		||||
//                             // just skip flushing if it takes more than 1 second
 | 
			
		||||
//                             var flushCancel = new CancellationTokenSource();
 | 
			
		||||
//                             var flushToken = flushCancel.Token;
 | 
			
		||||
//                             var flushDelay = Task.Delay(1000, flushToken);
 | 
			
		||||
//                             await Task.WhenAny(flushDelay, pcm.FlushAsync(flushToken)).ConfigureAwait(false);
 | 
			
		||||
//                             flushCancel.Cancel();
 | 
			
		||||
//                             pcm.Dispose();
 | 
			
		||||
//                         }
 | 
			
		||||
//
 | 
			
		||||
//                         if (b != null)
 | 
			
		||||
//                             b.Dispose();
 | 
			
		||||
//
 | 
			
		||||
//                         OnCompleted?.Invoke(this, data.Song);
 | 
			
		||||
//
 | 
			
		||||
//                         if (_bytesSent == 0 && !cancel)
 | 
			
		||||
//                         {
 | 
			
		||||
//                             lock (locker)
 | 
			
		||||
//                                 Queue.RemoveSong(data.Song);
 | 
			
		||||
//                             Log.Information("Song removed because it can't play");
 | 
			
		||||
//                         }
 | 
			
		||||
//                     }
 | 
			
		||||
//                     try
 | 
			
		||||
//                     {
 | 
			
		||||
//                         //if repeating current song, just ignore other settings,
 | 
			
		||||
//                         // and play this song again (don't change the index)
 | 
			
		||||
//                         // ignore rcs if song is manually skipped
 | 
			
		||||
//
 | 
			
		||||
//                         int queueCount;
 | 
			
		||||
//                         bool stopped;
 | 
			
		||||
//                         int currentIndex;
 | 
			
		||||
//                         lock (locker)
 | 
			
		||||
//                         {
 | 
			
		||||
//                             queueCount = Queue.Count;
 | 
			
		||||
//                             stopped = Stopped;
 | 
			
		||||
//                             currentIndex = Queue.CurrentIndex;
 | 
			
		||||
//                         }
 | 
			
		||||
//
 | 
			
		||||
//                         if (AutoDelete && !RepeatCurrentSong && !RepeatPlaylist && data.Song != null)
 | 
			
		||||
//                         {
 | 
			
		||||
//                             Queue.RemoveSong(data.Song);
 | 
			
		||||
//                         }
 | 
			
		||||
//
 | 
			
		||||
//                         if (!manualIndex && (!RepeatCurrentSong || manualSkip))
 | 
			
		||||
//                         {
 | 
			
		||||
//                             if (Shuffle)
 | 
			
		||||
//                             {
 | 
			
		||||
//                                 Log.Information("Random song");
 | 
			
		||||
//                                 Queue.Random(); //if shuffle is set, set current song index to a random number
 | 
			
		||||
//                             }
 | 
			
		||||
//                             else
 | 
			
		||||
//                             {
 | 
			
		||||
//                                 //if last song, and autoplay is enabled, and if it's a youtube song
 | 
			
		||||
//                                 // do autplay magix
 | 
			
		||||
//                                 if (queueCount - 1 == data.Index && Autoplay && data.Song?.ProviderType == MusicType.YouTube)
 | 
			
		||||
//                                 {
 | 
			
		||||
//                                     try
 | 
			
		||||
//                                     {
 | 
			
		||||
//                                         Log.Information("Loading related song");
 | 
			
		||||
//                                         await _musicService.TryQueueRelatedSongAsync(data.Song, OutputTextChannel, VoiceChannel).ConfigureAwait(false);
 | 
			
		||||
//                                         if (!AutoDelete)
 | 
			
		||||
//                                             Queue.Next();
 | 
			
		||||
//                                     }
 | 
			
		||||
//                                     catch
 | 
			
		||||
//                                     {
 | 
			
		||||
//                                         Log.Information("Loading related song failed");
 | 
			
		||||
//                                     }
 | 
			
		||||
//                                 }
 | 
			
		||||
//                                 else if (FairPlay)
 | 
			
		||||
//                                 {
 | 
			
		||||
//                                     lock (locker)
 | 
			
		||||
//                                     {
 | 
			
		||||
//                                         Log.Information("Next fair song");
 | 
			
		||||
//                                         var queueList = Queue.ToList();
 | 
			
		||||
//                                         var q = queueList.Shuffle().ToArray();
 | 
			
		||||
//
 | 
			
		||||
//                                         bool found = false;
 | 
			
		||||
//                                         for (var i = 0; i < q.Length; i++) //first try to find a queuer who didn't have their song played recently
 | 
			
		||||
//                                         {
 | 
			
		||||
//                                             var item = q[i];
 | 
			
		||||
//                                             if (RecentlyPlayedUsers.Add(item.QueuerName)) // if it's found, set current song to that index
 | 
			
		||||
//                                             {
 | 
			
		||||
//                                                 Queue.CurrentIndex = queueList.IndexOf(q[i]);
 | 
			
		||||
//                                                 found = true;
 | 
			
		||||
//                                                 break;
 | 
			
		||||
//                                             }
 | 
			
		||||
//                                         }
 | 
			
		||||
//                                         if (!found) //if it's not
 | 
			
		||||
//                                         {
 | 
			
		||||
//                                             RecentlyPlayedUsers.Clear(); //clear all recently played users (that means everyone from the playlist has had their song played)
 | 
			
		||||
//                                             Queue.Random(); //go to a random song (to prevent looping on the first few songs)
 | 
			
		||||
//                                             var cur = Current;
 | 
			
		||||
//                                             if (cur.Current != null) // add newely scheduled song's queuer to the recently played list
 | 
			
		||||
//                                                 RecentlyPlayedUsers.Add(cur.Current.QueuerName);
 | 
			
		||||
//                                         }
 | 
			
		||||
//                                     }
 | 
			
		||||
//                                 }
 | 
			
		||||
//                                 else if (queueCount - 1 == data.Index && !RepeatPlaylist && !manualSkip)
 | 
			
		||||
//                                 {
 | 
			
		||||
//                                     Log.Information("Stopping because repeatplaylist is disabled");
 | 
			
		||||
//                                     lock (locker)
 | 
			
		||||
//                                     {
 | 
			
		||||
//                                         Stop();
 | 
			
		||||
//                                     }
 | 
			
		||||
//                                 }
 | 
			
		||||
//                                 else
 | 
			
		||||
//                                 {
 | 
			
		||||
//                                     Log.Information("Next song");
 | 
			
		||||
//                                     lock (locker)
 | 
			
		||||
//                                     {
 | 
			
		||||
//                                         if (!Stopped)
 | 
			
		||||
//                                             if (!AutoDelete)
 | 
			
		||||
//                                                 Queue.Next();
 | 
			
		||||
//                                     }
 | 
			
		||||
//                                 }
 | 
			
		||||
//                             }
 | 
			
		||||
//                         }
 | 
			
		||||
//                     }
 | 
			
		||||
//                     catch (Exception ex)
 | 
			
		||||
//                     {
 | 
			
		||||
//                         Log.Error(ex, "Error in queue");
 | 
			
		||||
//                     }
 | 
			
		||||
//                 }
 | 
			
		||||
//                 do
 | 
			
		||||
//                 {
 | 
			
		||||
//                     await Task.Delay(500).ConfigureAwait(false);
 | 
			
		||||
//                 }
 | 
			
		||||
//                 while ((Queue.Count == 0 || Stopped) && !Exited);
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         private async Task<IAudioClient> GetAudioClient(bool reconnect = false)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (_audioClient is null ||
 | 
			
		||||
//                 _audioClient.ConnectionState != ConnectionState.Connected ||
 | 
			
		||||
//                 reconnect ||
 | 
			
		||||
//                 newVoiceChannel)
 | 
			
		||||
//                 try
 | 
			
		||||
//                 {
 | 
			
		||||
//                     try
 | 
			
		||||
//                     {
 | 
			
		||||
//                         var t = _audioClient?.StopAsync();
 | 
			
		||||
//                         if (t != null)
 | 
			
		||||
//                         {
 | 
			
		||||
//
 | 
			
		||||
//                             Log.Information("Stopping audio client");
 | 
			
		||||
//                             await t.ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//                             Log.Information("Disposing audio client");
 | 
			
		||||
//                             _audioClient.Dispose();
 | 
			
		||||
//                         }
 | 
			
		||||
//                     }
 | 
			
		||||
//                     catch
 | 
			
		||||
//                     {
 | 
			
		||||
//                     }
 | 
			
		||||
//                     newVoiceChannel = false;
 | 
			
		||||
//
 | 
			
		||||
//                     var curUser = await VoiceChannel.Guild.GetCurrentUserAsync().ConfigureAwait(false);
 | 
			
		||||
//                     if (curUser.VoiceChannel != null)
 | 
			
		||||
//                     {
 | 
			
		||||
//                         Log.Information("Connecting");
 | 
			
		||||
//                         var ac = await VoiceChannel.ConnectAsync().ConfigureAwait(false);
 | 
			
		||||
//                         Log.Information("Connected, stopping");
 | 
			
		||||
//                         await ac.StopAsync().ConfigureAwait(false);
 | 
			
		||||
//                         Log.Information("Disconnected");
 | 
			
		||||
//                         await Task.Delay(1000).ConfigureAwait(false);
 | 
			
		||||
//                     }
 | 
			
		||||
//                     Log.Information("Connecting");
 | 
			
		||||
//                     _audioClient = await VoiceChannel.ConnectAsync().ConfigureAwait(false);
 | 
			
		||||
//                 }
 | 
			
		||||
//                 catch (Exception ex)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     Log.Warning("Error while getting audio client: {0}", ex.ToString());
 | 
			
		||||
//                     return null;
 | 
			
		||||
//                 }
 | 
			
		||||
//             return _audioClient;
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public int Enqueue(SongInfo song, bool forcePlay = false)
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (Exited)
 | 
			
		||||
//                     return -1;
 | 
			
		||||
//                 Queue.Add(song);
 | 
			
		||||
//                 var result = Queue.Count - 1;
 | 
			
		||||
//
 | 
			
		||||
//                 if (forcePlay)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     if (Stopped)
 | 
			
		||||
//                     {
 | 
			
		||||
//                         Stopped = false;
 | 
			
		||||
//                         SetIndex(result);
 | 
			
		||||
//                     }
 | 
			
		||||
//                     Unpause();
 | 
			
		||||
//                 }
 | 
			
		||||
//                 return result;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public int EnqueueNext(SongInfo song, bool forcePlay = false)
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (Exited)
 | 
			
		||||
//                     return -1;
 | 
			
		||||
//                 var toReturn = Queue.AddNext(song);
 | 
			
		||||
//                 if (forcePlay)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     Unpause();
 | 
			
		||||
//                     if (Stopped)
 | 
			
		||||
//                     {
 | 
			
		||||
//                         SetIndex(toReturn);
 | 
			
		||||
//                     }
 | 
			
		||||
//                 }
 | 
			
		||||
//                 return toReturn;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void SetIndex(int index)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (index < 0)
 | 
			
		||||
//                 throw new ArgumentOutOfRangeException(nameof(index));
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (Exited)
 | 
			
		||||
//                     return;
 | 
			
		||||
//                 if (AutoDelete && index >= Queue.CurrentIndex && index > 0)
 | 
			
		||||
//                     index--;
 | 
			
		||||
//                 Queue.CurrentIndex = index;
 | 
			
		||||
//                 manualIndex = true;
 | 
			
		||||
//                 Stopped = false;
 | 
			
		||||
//                 CancelCurrentSong();
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void Next(int skipCount = 1)
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (Exited)
 | 
			
		||||
//                     return;
 | 
			
		||||
//                 manualSkip = true;
 | 
			
		||||
//                 // if player is stopped, and user uses .n, it should play current song.
 | 
			
		||||
//                 // It's a bit weird, but that's the least annoying solution
 | 
			
		||||
//                 if (!Stopped)
 | 
			
		||||
//                     if (!RepeatPlaylist && Queue.IsLast() && !Autoplay) // if it's the last song in the queue, and repeat playlist is disabled
 | 
			
		||||
//                     { //stop the queue
 | 
			
		||||
//                         Stop();
 | 
			
		||||
//                         return;
 | 
			
		||||
//                     }
 | 
			
		||||
//                     else
 | 
			
		||||
//                         Queue.Next(skipCount - 1);
 | 
			
		||||
//                 else
 | 
			
		||||
//                     Queue.CurrentIndex = 0;
 | 
			
		||||
//                 Stopped = false;
 | 
			
		||||
//                 CancelCurrentSong();
 | 
			
		||||
//                 Unpause();
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void Stop(bool clearQueue = false)
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 Stopped = true;
 | 
			
		||||
//                 Autoplay = false;
 | 
			
		||||
//                 //Queue.ResetCurrent();
 | 
			
		||||
//                 if (clearQueue)
 | 
			
		||||
//                     Queue.Clear();
 | 
			
		||||
//                 Unpause();
 | 
			
		||||
//                 CancelCurrentSong();
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         private void Unpause()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (PauseTaskSource != null)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     PauseTaskSource.TrySetResult(true);
 | 
			
		||||
//                     PauseTaskSource = null;
 | 
			
		||||
//                 }
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void TogglePause()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (PauseTaskSource is null)
 | 
			
		||||
//                     PauseTaskSource = new TaskCompletionSource<bool>();
 | 
			
		||||
//                 else
 | 
			
		||||
//                 {
 | 
			
		||||
//                     Unpause();
 | 
			
		||||
//                 }
 | 
			
		||||
//             }
 | 
			
		||||
//             OnPauseChanged?.Invoke(this, PauseTaskSource != null);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void SetVolume(int volume)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (volume < 0 || volume > 100)
 | 
			
		||||
//                 throw new ArgumentOutOfRangeException(nameof(volume));
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 Volume = ((float)volume) / 100;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public SongInfo RemoveAt(int index)
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 var (Index, Song) = Queue.Current;
 | 
			
		||||
//                 var toReturn = Queue.RemoveAt(index);
 | 
			
		||||
//                 if (Index == index)
 | 
			
		||||
//                     Next();
 | 
			
		||||
//                 return toReturn;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         private void CancelCurrentSong()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 var cs = SongCancelSource;
 | 
			
		||||
//                 SongCancelSource = new CancellationTokenSource();
 | 
			
		||||
//                 cs.Cancel();
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void ClearQueue()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 Queue.Clear();
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public (int CurrentIndex, SongInfo[] Songs) QueueArray()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//                 return Queue.ToArray();
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         //aidiakapi ftw
 | 
			
		||||
//         // public static unsafe byte[] AdjustVolume(byte[] audioSamples, float volume)
 | 
			
		||||
//         // {
 | 
			
		||||
//         //     if (Math.Abs(volume - 1f) < 0.0001f) return audioSamples;
 | 
			
		||||
//         //
 | 
			
		||||
//         //     // 16-bit precision for the multiplication
 | 
			
		||||
//         //     var volumeFixed = (int)Math.Round(volume * 65536d);
 | 
			
		||||
//         //
 | 
			
		||||
//         //     var count = audioSamples.Length / 2;
 | 
			
		||||
//         //
 | 
			
		||||
//         //     fixed (byte* srcBytes = audioSamples)
 | 
			
		||||
//         //     {
 | 
			
		||||
//         //         var src = (short*)srcBytes;
 | 
			
		||||
//         //
 | 
			
		||||
//         //         for (var i = count; i != 0; i--, src++)
 | 
			
		||||
//         //             *src = (short)(((*src) * volumeFixed) >> 16);
 | 
			
		||||
//         //     }
 | 
			
		||||
//         //
 | 
			
		||||
//         //     return audioSamples;
 | 
			
		||||
//         // }
 | 
			
		||||
//         
 | 
			
		||||
//         private static void AdjustVolume(byte[] audioSamples, float volume)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (Math.Abs(volume - 1f) < 0.0001f) return;
 | 
			
		||||
//             
 | 
			
		||||
//             var samples = MemoryMarshal.Cast<byte, short>(audioSamples);
 | 
			
		||||
//
 | 
			
		||||
//             for (var i = 0; i < samples.Length; i++)
 | 
			
		||||
//             {
 | 
			
		||||
//                 ref var sample = ref samples[i];
 | 
			
		||||
//                 sample = (short) (sample * volume);
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public bool ToggleRepeatSong()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 return RepeatCurrentSong = !RepeatCurrentSong;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public async Task Destroy()
 | 
			
		||||
//         {
 | 
			
		||||
//             Log.Information("Destroying");
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 Stop();
 | 
			
		||||
//                 Exited = true;
 | 
			
		||||
//                 Unpause();
 | 
			
		||||
//
 | 
			
		||||
//                 OnCompleted = null;
 | 
			
		||||
//                 OnPauseChanged = null;
 | 
			
		||||
//                 OnStarted = null;
 | 
			
		||||
//             }
 | 
			
		||||
//             var ac = _audioClient;
 | 
			
		||||
//             if (ac != null)
 | 
			
		||||
//                 await ac.StopAsync().ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public bool ToggleShuffle()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 return Shuffle = !Shuffle;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public bool ToggleAutoplay()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 return Autoplay = !Autoplay;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public bool ToggleRepeatPlaylist()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 return RepeatPlaylist = !RepeatPlaylist;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public async Task SetVoiceChannel(IVoiceChannel vch)
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (Exited)
 | 
			
		||||
//                     return;
 | 
			
		||||
//                 VoiceChannel = vch;
 | 
			
		||||
//             }
 | 
			
		||||
//             _audioClient = await vch.ConnectAsync().ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public async Task UpdateSongDurationsAsync()
 | 
			
		||||
//         {
 | 
			
		||||
//             var (_, songs) = Queue.ToArray();
 | 
			
		||||
//             var toUpdate = songs
 | 
			
		||||
//                 .Where(x => x.ProviderType == MusicType.YouTube
 | 
			
		||||
//                     && x.TotalTime == TimeSpan.Zero);
 | 
			
		||||
//
 | 
			
		||||
//             var vIds = toUpdate.Select(x => x.VideoId);
 | 
			
		||||
//             if (!vIds.Any())
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             var durations = await _google.GetVideoDurationsAsync(vIds).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//             foreach (var x in toUpdate)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (durations.TryGetValue(x.VideoId, out var dur))
 | 
			
		||||
//                     x.TotalTime = dur;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public SongInfo MoveSong(int n1, int n2)
 | 
			
		||||
//             => Queue.MoveSong(n1, n2);
 | 
			
		||||
//
 | 
			
		||||
//         public void SetMusicChannelToOriginal()
 | 
			
		||||
//         {
 | 
			
		||||
//             this.OutputTextChannel = OriginalTextChannel;
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         //// this should be written better
 | 
			
		||||
//         //public TimeSpan TotalPlaytime =>
 | 
			
		||||
//         //    _playlist.Any(s => s.TotalTime == TimeSpan.MaxValue) ?
 | 
			
		||||
//         //    TimeSpan.MaxValue :
 | 
			
		||||
//         //    new TimeSpan(_playlist.Sum(s => s.TotalTime.Ticks));
 | 
			
		||||
//     }
 | 
			
		||||
// }
 | 
			
		||||
@@ -1,223 +0,0 @@
 | 
			
		||||
// using NadekoBot.Extensions;
 | 
			
		||||
// using NadekoBot.Modules.Music.Common.Exceptions;
 | 
			
		||||
// using System;
 | 
			
		||||
// using System.Collections.Generic;
 | 
			
		||||
// using System.Linq;
 | 
			
		||||
// using System.Threading.Tasks;
 | 
			
		||||
// using NadekoBot.Common;
 | 
			
		||||
//
 | 
			
		||||
// namespace NadekoBot.Modules.Music.Common
 | 
			
		||||
// {
 | 
			
		||||
//     public sealed class MusicQueue : IDisposable
 | 
			
		||||
//     {
 | 
			
		||||
//         private LinkedList<SongInfo> Songs { get; set; } = new LinkedList<SongInfo>();
 | 
			
		||||
//         private int _currentIndex = 0;
 | 
			
		||||
//         public int CurrentIndex
 | 
			
		||||
//         {
 | 
			
		||||
//             get
 | 
			
		||||
//             {
 | 
			
		||||
//                 return _currentIndex;
 | 
			
		||||
//             }
 | 
			
		||||
//             set
 | 
			
		||||
//             {
 | 
			
		||||
//                 lock (locker)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     if (Songs.Count == 0)
 | 
			
		||||
//                         _currentIndex = 0;
 | 
			
		||||
//                     else
 | 
			
		||||
//                         _currentIndex = value %= Songs.Count;
 | 
			
		||||
//                 }
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//         public (int Index, SongInfo Song) Current
 | 
			
		||||
//         {
 | 
			
		||||
//             get
 | 
			
		||||
//             {
 | 
			
		||||
//                 var cur = CurrentIndex;
 | 
			
		||||
//                 return (cur, Songs.ElementAtOrDefault(cur));
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         private readonly object locker = new object();
 | 
			
		||||
//         private TaskCompletionSource<bool> nextSource { get; } = new TaskCompletionSource<bool>();
 | 
			
		||||
//         public int Count
 | 
			
		||||
//         {
 | 
			
		||||
//             get
 | 
			
		||||
//             {
 | 
			
		||||
//                 lock (locker)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     return Songs.Count;
 | 
			
		||||
//                 }
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         private uint _maxQueueSize;
 | 
			
		||||
//         public uint MaxQueueSize
 | 
			
		||||
//         {
 | 
			
		||||
//             get => _maxQueueSize;
 | 
			
		||||
//             set
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (value < 0)
 | 
			
		||||
//                     throw new ArgumentOutOfRangeException(nameof(value));
 | 
			
		||||
//
 | 
			
		||||
//                 lock (locker)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     _maxQueueSize = value;
 | 
			
		||||
//                 }
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void Add(SongInfo song)
 | 
			
		||||
//         {
 | 
			
		||||
//             song.ThrowIfNull(nameof(song));
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if(MaxQueueSize != 0 && Songs.Count >= MaxQueueSize)
 | 
			
		||||
//                     throw new QueueFullException();
 | 
			
		||||
//                 Songs.AddLast(song);
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public int AddNext(SongInfo song)
 | 
			
		||||
//         {
 | 
			
		||||
//             song.ThrowIfNull(nameof(song));
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (MaxQueueSize != 0 && Songs.Count >= MaxQueueSize)
 | 
			
		||||
//                     throw new QueueFullException();
 | 
			
		||||
//                 var curSong = Current.Song;
 | 
			
		||||
//                 if (curSong is null)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     Songs.AddLast(song);
 | 
			
		||||
//                     return Songs.Count;
 | 
			
		||||
//                 }
 | 
			
		||||
//
 | 
			
		||||
//                 var songlist = Songs.ToList();
 | 
			
		||||
//                 songlist.Insert(CurrentIndex + 1, song);
 | 
			
		||||
//                 Songs = new LinkedList<SongInfo>(songlist);
 | 
			
		||||
//                 return CurrentIndex + 1;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void Next(int skipCount = 1)
 | 
			
		||||
//         {
 | 
			
		||||
//             lock(locker)
 | 
			
		||||
//                 CurrentIndex += skipCount;
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void Dispose()
 | 
			
		||||
//         {
 | 
			
		||||
//             Clear();
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public SongInfo RemoveAt(int index)
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (index < 0 || index >= Songs.Count)
 | 
			
		||||
//                     throw new ArgumentOutOfRangeException(nameof(index));
 | 
			
		||||
//
 | 
			
		||||
//                 var current = Songs.First.Value;
 | 
			
		||||
//                 for (int i = 0; i < Songs.Count; i++)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     if (i == index)
 | 
			
		||||
//                     {
 | 
			
		||||
//                         current = Songs.ElementAt(index);
 | 
			
		||||
//                         Songs.Remove(current);
 | 
			
		||||
//                         if (CurrentIndex != 0)
 | 
			
		||||
//                         {
 | 
			
		||||
//                             if (CurrentIndex >= index)
 | 
			
		||||
//                             {
 | 
			
		||||
//                                 --CurrentIndex;
 | 
			
		||||
//                             }
 | 
			
		||||
//                         }
 | 
			
		||||
//                         break;
 | 
			
		||||
//                     }
 | 
			
		||||
//                 }
 | 
			
		||||
//                 return current;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void Clear()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 Songs.Clear();
 | 
			
		||||
//                 CurrentIndex = 0;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public (int CurrentIndex, SongInfo[] Songs) ToArray()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 return (CurrentIndex, Songs.ToArray());
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public List<SongInfo> ToList()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 return Songs.ToList();
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void ResetCurrent()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 CurrentIndex = 0;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void Random()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 CurrentIndex = new NadekoRandom().Next(Songs.Count);
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public SongInfo MoveSong(int n1, int n2)
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 var currentSong = Current.Song;
 | 
			
		||||
//                 var playlist = Songs.ToList();
 | 
			
		||||
//                 if (n1 >= playlist.Count || n2 >= playlist.Count || n1 == n2)
 | 
			
		||||
//                     return null;
 | 
			
		||||
//
 | 
			
		||||
//                 var s = playlist[n1];
 | 
			
		||||
//
 | 
			
		||||
//                 playlist.RemoveAt(n1);
 | 
			
		||||
//                 playlist.Insert(n2, s);
 | 
			
		||||
//
 | 
			
		||||
//                 Songs = new LinkedList<SongInfo>(playlist);
 | 
			
		||||
//
 | 
			
		||||
//
 | 
			
		||||
//                 if (currentSong != null)
 | 
			
		||||
//                     CurrentIndex = playlist.IndexOf(currentSong);
 | 
			
		||||
//
 | 
			
		||||
//                 return s;
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void RemoveSong(SongInfo song)
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//             {
 | 
			
		||||
//                 Songs.Remove(song);
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public bool IsLast()
 | 
			
		||||
//         {
 | 
			
		||||
//             lock (locker)
 | 
			
		||||
//                 return CurrentIndex == Songs.Count - 1;
 | 
			
		||||
//         }
 | 
			
		||||
//     }
 | 
			
		||||
// }
 | 
			
		||||
// //O O [O] O O O O
 | 
			
		||||
// //
 | 
			
		||||
// // 3
 | 
			
		||||
@@ -155,7 +155,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        // join vc
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task Join()
 | 
			
		||||
        {
 | 
			
		||||
@@ -173,7 +173,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // leave vc (destroy)
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task Destroy()
 | 
			
		||||
        {
 | 
			
		||||
@@ -185,37 +185,37 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        // play - no args = next
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [Priority(2)]
 | 
			
		||||
        public Task Play()
 | 
			
		||||
            => Next();
 | 
			
		||||
        
 | 
			
		||||
        // play - index = skip to that index
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public Task Play(int index)
 | 
			
		||||
            => MoveToIndex(index);
 | 
			
		||||
        
 | 
			
		||||
        // play - query = q(query)
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        public Task Play([Leftover] string query)
 | 
			
		||||
            => QueueByQuery(query); 
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public Task Queue([Leftover] string query)
 | 
			
		||||
            => QueueByQuery(query);
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public Task QueueNext([Leftover] string query)
 | 
			
		||||
            => QueueByQuery(query, asNext: true);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task Volume(int vol)
 | 
			
		||||
        {
 | 
			
		||||
@@ -233,7 +233,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("volume_set", vol);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task Next()
 | 
			
		||||
        {
 | 
			
		||||
@@ -252,7 +252,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
        private const int LQ_ITEMS_PER_PAGE = 9;
 | 
			
		||||
        
 | 
			
		||||
        // list queue, relevant page
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task ListQueue()
 | 
			
		||||
        {
 | 
			
		||||
@@ -267,7 +267,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        // list queue, specify page
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task ListQueue(int page)
 | 
			
		||||
        {
 | 
			
		||||
@@ -348,7 +348,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // search
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task QueueSearch([Leftover] string query)
 | 
			
		||||
        {
 | 
			
		||||
@@ -404,7 +404,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public async Task TrackRemove(int index)
 | 
			
		||||
@@ -441,7 +441,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
         public enum All { All = -1 }
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         [Priority(0)]
 | 
			
		||||
         public async Task TrackRemove(All _ = All.All)
 | 
			
		||||
@@ -460,7 +460,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
             await ReplyConfirmLocalizedAsync("queue_cleared").ConfigureAwait(false);
 | 
			
		||||
         }
 | 
			
		||||
         
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         public async Task Stop()
 | 
			
		||||
         {
 | 
			
		||||
@@ -492,7 +492,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
             _ => PlayerRepeatType.Queue
 | 
			
		||||
         };
 | 
			
		||||
         
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         public async Task QueueRepeat(InputRepeatType type = InputRepeatType.Queue)
 | 
			
		||||
         {
 | 
			
		||||
@@ -510,7 +510,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
                 await ReplyConfirmLocalizedAsync("repeating_track");
 | 
			
		||||
         }
 | 
			
		||||
         
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         public async Task ReptCurSong()
 | 
			
		||||
         {
 | 
			
		||||
@@ -518,7 +518,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
             await QueueRepeat(InputRepeatType.Song);
 | 
			
		||||
         }
 | 
			
		||||
         
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         public async Task Pause()
 | 
			
		||||
         {
 | 
			
		||||
@@ -535,18 +535,18 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
             mp.TogglePause();
 | 
			
		||||
         }
 | 
			
		||||
         
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         public Task Radio(string radioLink)
 | 
			
		||||
             => QueueByQuery(radioLink, false, MusicPlatform.Radio);
 | 
			
		||||
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         [OwnerOnly]
 | 
			
		||||
         public Task Local([Leftover] string path)
 | 
			
		||||
             => QueueByQuery(path, false, MusicPlatform.Local);
 | 
			
		||||
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         [OwnerOnly]
 | 
			
		||||
         public async Task LocalPlaylist([Leftover] string dirPath)
 | 
			
		||||
@@ -586,7 +586,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
             await ReplyConfirmLocalizedAsync("dir_queue_complete").ConfigureAwait(false);
 | 
			
		||||
         }
 | 
			
		||||
         
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         public async Task MoveSong(int from, int to)
 | 
			
		||||
         {
 | 
			
		||||
@@ -627,12 +627,12 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
             await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
         }
 | 
			
		||||
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         public Task SoundCloudQueue([Leftover] string query)
 | 
			
		||||
             => QueueByQuery(query, false, MusicPlatform.SoundCloud);
 | 
			
		||||
         
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         public async Task SoundCloudPl([Leftover] string playlist)
 | 
			
		||||
         {
 | 
			
		||||
@@ -657,7 +657,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
             await ctx.OkAsync();
 | 
			
		||||
         }
 | 
			
		||||
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         public async Task Playlist([Leftover] string playlistQuery)
 | 
			
		||||
         {
 | 
			
		||||
@@ -687,7 +687,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
             await ctx.OkAsync();
 | 
			
		||||
         }
 | 
			
		||||
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         public async Task NowPlaying()
 | 
			
		||||
         {
 | 
			
		||||
@@ -711,7 +711,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
             await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
         }
 | 
			
		||||
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         public async Task PlaylistShuffle()
 | 
			
		||||
         {
 | 
			
		||||
@@ -730,7 +730,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
             await ReplyConfirmLocalizedAsync("queue_shuffled");
 | 
			
		||||
         }
 | 
			
		||||
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
         public async Task SetMusicChannel()
 | 
			
		||||
@@ -740,7 +740,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
             await ReplyConfirmLocalizedAsync("set_music_channel");
 | 
			
		||||
         }
 | 
			
		||||
         
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
         public async Task UnsetMusicChannel()
 | 
			
		||||
@@ -750,7 +750,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
             await ReplyConfirmLocalizedAsync("unset_music_channel");
 | 
			
		||||
         }
 | 
			
		||||
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         public async Task AutoDisconnect()
 | 
			
		||||
         {
 | 
			
		||||
@@ -762,7 +762,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("autodc_disable");
 | 
			
		||||
         }
 | 
			
		||||
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         [RequireUserPermission(GuildPermission.Administrator)]
 | 
			
		||||
         public async Task MusicQuality()
 | 
			
		||||
@@ -771,7 +771,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
             await ReplyConfirmLocalizedAsync("current_music_quality", Format.Bold(quality.ToString()));
 | 
			
		||||
         }
 | 
			
		||||
         
 | 
			
		||||
         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         [RequireUserPermission(GuildPermission.Administrator)]
 | 
			
		||||
         public async Task MusicQuality(QualityPreset preset)
 | 
			
		||||
 
 | 
			
		||||
@@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Playlists([Leftover] int num = 1)
 | 
			
		||||
            {
 | 
			
		||||
@@ -69,7 +69,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
                await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task DeletePlaylist([Leftover] int id)
 | 
			
		||||
            {
 | 
			
		||||
@@ -102,7 +102,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("playlist_deleted").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task PlaylistShow(int id, int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
@@ -129,7 +129,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
                }, mpl.Songs.Count, 20).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Save([Leftover] string name)
 | 
			
		||||
            {
 | 
			
		||||
@@ -172,7 +172,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
 | 
			
		||||
            private static readonly SemaphoreSlim _playlistLock = new SemaphoreSlim(1, 1);
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Load([Leftover] int id)
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,297 +0,0 @@
 | 
			
		||||
// using System.Collections.Concurrent;
 | 
			
		||||
// using System.Linq;
 | 
			
		||||
// using System.Threading.Tasks;
 | 
			
		||||
// using Discord;
 | 
			
		||||
// using NadekoBot.Extensions;
 | 
			
		||||
// using NadekoBot.Services.Database.Models;
 | 
			
		||||
// using System.IO;
 | 
			
		||||
// using Discord.Commands;
 | 
			
		||||
// using Discord.WebSocket;
 | 
			
		||||
// using NadekoBot.Common;
 | 
			
		||||
// using NadekoBot.Services;
 | 
			
		||||
// using NadekoBot.Services;
 | 
			
		||||
// using NadekoBot.Modules.Music.Common;
 | 
			
		||||
// using NadekoBot.Modules.Music.Common.Exceptions;
 | 
			
		||||
// using NadekoBot.Modules.Music.Common.SongResolver;
 | 
			
		||||
// using NadekoBot.Common.Collections;
 | 
			
		||||
// using Microsoft.EntityFrameworkCore;
 | 
			
		||||
// using Serilog;
 | 
			
		||||
//
 | 
			
		||||
// namespace NadekoBot.Modules.Music.Services
 | 
			
		||||
// {
 | 
			
		||||
//     public class MusicService : INService, IUnloadableService
 | 
			
		||||
//     {
 | 
			
		||||
//         public const string MusicDataPath = "data/musicdata";
 | 
			
		||||
//
 | 
			
		||||
//         private readonly IGoogleApiService _google;
 | 
			
		||||
//         private readonly IBotStrings _strings;
 | 
			
		||||
//         private readonly DbService _db;
 | 
			
		||||
//         private readonly AyuVoiceStateService _tracker;
 | 
			
		||||
//         private readonly ConcurrentDictionary<ulong, MusicSettings> _musicSettings;
 | 
			
		||||
//         private readonly SoundCloudApiService _sc;
 | 
			
		||||
//         private readonly IBotCredentials _creds;
 | 
			
		||||
//         private readonly ConcurrentDictionary<ulong, float> _defaultVolumes;
 | 
			
		||||
//
 | 
			
		||||
//         public ConcurrentHashSet<ulong> AutoDcServers { get; }
 | 
			
		||||
//
 | 
			
		||||
//         private readonly DiscordSocketClient _client;
 | 
			
		||||
//
 | 
			
		||||
//         public ConcurrentDictionary<ulong, MusicPlayer> MusicPlayers { get; } = new ConcurrentDictionary<ulong, MusicPlayer>();
 | 
			
		||||
//
 | 
			
		||||
//         public MusicService(DiscordSocketClient client, IGoogleApiService google,
 | 
			
		||||
//             IBotStrings strings, DbService db, AyuVoiceStateService tracker,
 | 
			
		||||
//             SoundCloudApiService sc, IBotCredentials creds, NadekoBot bot)
 | 
			
		||||
//         {
 | 
			
		||||
//             _client = client;
 | 
			
		||||
//             _google = google;
 | 
			
		||||
//             _strings = strings;
 | 
			
		||||
//             _db = db;
 | 
			
		||||
//             _tracker = tracker;
 | 
			
		||||
//             _sc = sc;
 | 
			
		||||
//             _creds = creds;
 | 
			
		||||
//             _musicSettings = bot.AllGuildConfigs.ToDictionary(x => x.GuildId, x => x.MusicSettings)
 | 
			
		||||
//                 .ToConcurrent();
 | 
			
		||||
//
 | 
			
		||||
//             _client.LeftGuild += _client_LeftGuild;
 | 
			
		||||
//             try { Directory.Delete(MusicDataPath, true); } catch { }
 | 
			
		||||
//
 | 
			
		||||
//             _defaultVolumes = new ConcurrentDictionary<ulong, float>(
 | 
			
		||||
//                 bot.AllGuildConfigs
 | 
			
		||||
//                     .ToDictionary(x => x.GuildId, x => x.DefaultMusicVolume));
 | 
			
		||||
//
 | 
			
		||||
//             AutoDcServers = new ConcurrentHashSet<ulong>(bot.AllGuildConfigs.Where(x => x.AutoDcFromVc).Select(x => x.GuildId));
 | 
			
		||||
//
 | 
			
		||||
//             Directory.CreateDirectory(MusicDataPath);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public Task Unload()
 | 
			
		||||
//         {
 | 
			
		||||
//             _client.LeftGuild -= _client_LeftGuild;
 | 
			
		||||
//             return Task.CompletedTask;
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         private Task _client_LeftGuild(SocketGuild arg)
 | 
			
		||||
//         {
 | 
			
		||||
//             var t = DestroyPlayer(arg.Id);
 | 
			
		||||
//             return Task.CompletedTask;
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public float GetDefaultVolume(ulong guildId)
 | 
			
		||||
//         {
 | 
			
		||||
//             return _defaultVolumes.GetOrAdd(guildId, (id) =>
 | 
			
		||||
//             {
 | 
			
		||||
//                 using (var uow = _db.GetDbContext())
 | 
			
		||||
//                 {
 | 
			
		||||
//                     return uow.GuildConfigsForId(guildId, set => set).DefaultMusicVolume;
 | 
			
		||||
//                 }
 | 
			
		||||
//             });
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public Task<MusicPlayer> GetOrCreatePlayer(ICommandContext context)
 | 
			
		||||
//         {
 | 
			
		||||
//             var gUsr = (IGuildUser)context.User;
 | 
			
		||||
//             var txtCh = (ITextChannel)context.Channel;
 | 
			
		||||
//             var vCh = gUsr.VoiceChannel;
 | 
			
		||||
//             return GetOrCreatePlayer(context.Guild.Id, vCh, txtCh);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public async Task<MusicPlayer> GetOrCreatePlayer(ulong guildId, IVoiceChannel voiceCh, ITextChannel textCh)
 | 
			
		||||
//         {
 | 
			
		||||
//             string GetText(string text, params object[] replacements) =>
 | 
			
		||||
//                 _strings.GetText(text, textCh.Guild.Id, replacements);
 | 
			
		||||
//             
 | 
			
		||||
//             if (voiceCh is null || voiceCh.Guild != textCh.Guild)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (textCh != null)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     await textCh.SendErrorAsync(GetText("must_be_in_voice")).ConfigureAwait(false);
 | 
			
		||||
//                 }
 | 
			
		||||
//                 throw new NotInVoiceChannelException();
 | 
			
		||||
//             }
 | 
			
		||||
//             return MusicPlayers.GetOrAdd(guildId, _ =>
 | 
			
		||||
//             {
 | 
			
		||||
//                 var vol = GetDefaultVolume(guildId);
 | 
			
		||||
//                 if (!_musicSettings.TryGetValue(guildId, out var ms))
 | 
			
		||||
//                     ms = new MusicSettings();
 | 
			
		||||
//
 | 
			
		||||
//                 var mp = new MusicPlayer(this, ms, _google, voiceCh, textCh, vol, _tracker);
 | 
			
		||||
//
 | 
			
		||||
//                 IUserMessage playingMessage = null;
 | 
			
		||||
//                 IUserMessage lastFinishedMessage = null;
 | 
			
		||||
//
 | 
			
		||||
//                 mp.OnCompleted += async (s, song) =>
 | 
			
		||||
//                 {
 | 
			
		||||
//                     try
 | 
			
		||||
//                     {
 | 
			
		||||
//                         lastFinishedMessage?.DeleteAfter(0);
 | 
			
		||||
//
 | 
			
		||||
//                         try
 | 
			
		||||
//                         {
 | 
			
		||||
//                             lastFinishedMessage = await mp.OutputTextChannel.EmbedAsync(new EmbedBuilder().WithOkColor()
 | 
			
		||||
//                                     .WithAuthor(eab => eab.WithName(GetText("finished_song")).WithMusicIcon())
 | 
			
		||||
//                                     .WithDescription(song.PrettyName)
 | 
			
		||||
//                                     .WithFooter(ef => ef.WithText(song.PrettyInfo)))
 | 
			
		||||
//                                 .ConfigureAwait(false);
 | 
			
		||||
//                         }
 | 
			
		||||
//                         catch
 | 
			
		||||
//                         {
 | 
			
		||||
//                             // ignored
 | 
			
		||||
//                         }
 | 
			
		||||
//
 | 
			
		||||
//                         var (Index, Current) = mp.Current;
 | 
			
		||||
//                         if (Current is null
 | 
			
		||||
//                             && !mp.RepeatCurrentSong
 | 
			
		||||
//                             && !mp.RepeatPlaylist
 | 
			
		||||
//                             && !mp.FairPlay
 | 
			
		||||
//                             && AutoDcServers.Contains(guildId))
 | 
			
		||||
//                         {
 | 
			
		||||
//                             await DestroyPlayer(guildId).ConfigureAwait(false);
 | 
			
		||||
//                         }
 | 
			
		||||
//                     }
 | 
			
		||||
//                     catch
 | 
			
		||||
//                     {
 | 
			
		||||
//                         // ignored
 | 
			
		||||
//                     }
 | 
			
		||||
//                 };
 | 
			
		||||
//                 mp.OnStarted += async (player, song) =>
 | 
			
		||||
//                 {
 | 
			
		||||
//                     //try { await mp.UpdateSongDurationsAsync().ConfigureAwait(false); }
 | 
			
		||||
//                     //catch
 | 
			
		||||
//                     //{
 | 
			
		||||
//                     //    // ignored
 | 
			
		||||
//                     //}
 | 
			
		||||
//                     var sender = player;
 | 
			
		||||
//                     if (sender is null)
 | 
			
		||||
//                         return;
 | 
			
		||||
//                     try
 | 
			
		||||
//                     {
 | 
			
		||||
//                         playingMessage?.DeleteAfter(0);
 | 
			
		||||
//
 | 
			
		||||
//                         playingMessage = await mp.OutputTextChannel.EmbedAsync(new EmbedBuilder().WithOkColor()
 | 
			
		||||
//                                                     .WithAuthor(eab => eab.WithName(GetText("playing_song", song.Index + 1)).WithMusicIcon())
 | 
			
		||||
//                                                     .WithDescription(song.Song.PrettyName)
 | 
			
		||||
//                                                     .WithFooter(ef => ef.WithText(mp.PrettyVolume + " | " + song.Song.PrettyInfo)))
 | 
			
		||||
//                                                     .ConfigureAwait(false);
 | 
			
		||||
//                     }
 | 
			
		||||
//                     catch
 | 
			
		||||
//                     {
 | 
			
		||||
//                         // ignored
 | 
			
		||||
//                     }
 | 
			
		||||
//                 };
 | 
			
		||||
//                 mp.OnPauseChanged += async (player, paused) =>
 | 
			
		||||
//                 {
 | 
			
		||||
//                     try
 | 
			
		||||
//                     {
 | 
			
		||||
//                         IUserMessage msg;
 | 
			
		||||
//                         if (paused)
 | 
			
		||||
//                             msg = await mp.OutputTextChannel.SendConfirmAsync(GetText("paused")).ConfigureAwait(false);
 | 
			
		||||
//                         else
 | 
			
		||||
//                             msg = await mp.OutputTextChannel.SendConfirmAsync(GetText("resumed")).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//                         msg?.DeleteAfter(10);
 | 
			
		||||
//                     }
 | 
			
		||||
//                     catch
 | 
			
		||||
//                     {
 | 
			
		||||
//                         // ignored
 | 
			
		||||
//                     }
 | 
			
		||||
//                 };
 | 
			
		||||
//                 Log.Information("Done creating");
 | 
			
		||||
//                 return mp;
 | 
			
		||||
//             });
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public MusicPlayer GetPlayerOrDefault(ulong guildId)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (MusicPlayers.TryGetValue(guildId, out var mp))
 | 
			
		||||
//                 return mp;
 | 
			
		||||
//             else
 | 
			
		||||
//                 return null;
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public async Task TryQueueRelatedSongAsync(SongInfo song, ITextChannel txtCh, IVoiceChannel vch)
 | 
			
		||||
//         {
 | 
			
		||||
//             var related = (await _google.GetRelatedVideosAsync(song.VideoId, 4).ConfigureAwait(false)).ToArray();
 | 
			
		||||
//             if (!related.Any())
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             var si = await ResolveSong(related[new NadekoRandom().Next(related.Length)], _client.CurrentUser.ToString(), MusicType.YouTube).ConfigureAwait(false);
 | 
			
		||||
//             if (si is null)
 | 
			
		||||
//                 throw new SongNotFoundException();
 | 
			
		||||
//             var mp = await GetOrCreatePlayer(txtCh.GuildId, vch, txtCh).ConfigureAwait(false);
 | 
			
		||||
//             mp.Enqueue(si);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public async Task<SongInfo> ResolveSong(string query, string queuerName, MusicType? musicType = null)
 | 
			
		||||
//         {
 | 
			
		||||
//             query.ThrowIfNull(nameof(query));
 | 
			
		||||
//
 | 
			
		||||
//             ISongResolverFactory resolverFactory = new SongResolverFactory(_sc);
 | 
			
		||||
//             var strategy = await resolverFactory.GetResolveStrategy(query, musicType).ConfigureAwait(false);
 | 
			
		||||
//             var sinfo = await strategy.ResolveSong(query).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//             if (sinfo is null)
 | 
			
		||||
//                 return null;
 | 
			
		||||
//
 | 
			
		||||
//             sinfo.QueuerName = queuerName;
 | 
			
		||||
//
 | 
			
		||||
//             return sinfo;
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public async Task DestroyAllPlayers()
 | 
			
		||||
//         {
 | 
			
		||||
//             foreach (var key in MusicPlayers.Keys)
 | 
			
		||||
//             {
 | 
			
		||||
//                 await DestroyPlayer(key).ConfigureAwait(false);
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public async Task DestroyPlayer(ulong id)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (MusicPlayers.TryRemove(id, out var mp))
 | 
			
		||||
//                 await mp.Destroy().ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public bool ToggleAutoDc(ulong id)
 | 
			
		||||
//         {
 | 
			
		||||
//             bool val;
 | 
			
		||||
//             using (var uow = _db.GetDbContext())
 | 
			
		||||
//             {
 | 
			
		||||
//                 var gc = uow.GuildConfigsForId(id, set => set);
 | 
			
		||||
//                 val = gc.AutoDcFromVc = !gc.AutoDcFromVc;
 | 
			
		||||
//                 uow.SaveChanges();
 | 
			
		||||
//             }
 | 
			
		||||
//
 | 
			
		||||
//             if (val)
 | 
			
		||||
//                 AutoDcServers.Add(id);
 | 
			
		||||
//             else
 | 
			
		||||
//                 AutoDcServers.TryRemove(id);
 | 
			
		||||
//
 | 
			
		||||
//             return val;
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void UpdateSettings(ulong id, MusicSettings musicSettings)
 | 
			
		||||
//         {
 | 
			
		||||
//             _musicSettings.AddOrUpdate(id, musicSettings, delegate { return musicSettings; });
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void SetMusicChannel(ulong guildId, ulong? cid)
 | 
			
		||||
//         {
 | 
			
		||||
//             using (var uow = _db.GetDbContext())
 | 
			
		||||
//             {
 | 
			
		||||
//                 var ms = uow.GuildConfigsForId(guildId, set => set.Include(x => x.MusicSettings)).MusicSettings;
 | 
			
		||||
//                 ms.MusicChannelId = cid;
 | 
			
		||||
//                 uow.SaveChanges();
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public void SetSongAutoDelete(ulong guildId, bool val)
 | 
			
		||||
//         {
 | 
			
		||||
//             using (var uow = _db.GetDbContext())
 | 
			
		||||
//             {
 | 
			
		||||
//                 var ms = uow.GuildConfigsForId(guildId, set => set.Include(x => x.MusicSettings)).MusicSettings;
 | 
			
		||||
//                 ms.SongAutoDelete = val;
 | 
			
		||||
//                 uow.SaveChanges();
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//     }
 | 
			
		||||
// }
 | 
			
		||||
@@ -1,984 +0,0 @@
 | 
			
		||||
// using Discord;
 | 
			
		||||
// using Discord.Commands;
 | 
			
		||||
// using Discord.WebSocket;
 | 
			
		||||
// using NadekoBot.Common;
 | 
			
		||||
// using NadekoBot.Common.Attributes;
 | 
			
		||||
// using NadekoBot.Common.Collections;
 | 
			
		||||
// using NadekoBot.Services;
 | 
			
		||||
// using NadekoBot.Services.Database.Models;
 | 
			
		||||
// using NadekoBot.Services;
 | 
			
		||||
// using NadekoBot.Extensions;
 | 
			
		||||
// using NadekoBot.Modules.Administration.Services;
 | 
			
		||||
// using NadekoBot.Modules.Music.Common;
 | 
			
		||||
// using NadekoBot.Modules.Music.Common.Exceptions;
 | 
			
		||||
// using NadekoBot.Modules.Music.Extensions;
 | 
			
		||||
// using NadekoBot.Modules.Music.Services;
 | 
			
		||||
// using Newtonsoft.Json.Linq;
 | 
			
		||||
// using System;
 | 
			
		||||
// using System.Collections.Generic;
 | 
			
		||||
// using System.IO;
 | 
			
		||||
// using System.Linq;
 | 
			
		||||
// using System.Net.Http;
 | 
			
		||||
// using System.Threading.Tasks;
 | 
			
		||||
// using Serilog;
 | 
			
		||||
//
 | 
			
		||||
// namespace NadekoBot.Modules.Music
 | 
			
		||||
// {
 | 
			
		||||
//     [NoPublicBot]
 | 
			
		||||
//     public class Music : NadekoModule<MusicService>
 | 
			
		||||
//     {
 | 
			
		||||
//         private readonly DiscordSocketClient _client;
 | 
			
		||||
//         private readonly IBotCredentials _creds;
 | 
			
		||||
//         private readonly IGoogleApiService _google;
 | 
			
		||||
//         private readonly DbService _db;
 | 
			
		||||
//         private readonly LogCommandService _logService;
 | 
			
		||||
//
 | 
			
		||||
//         public Music(DiscordSocketClient client,
 | 
			
		||||
//             IBotCredentials creds,
 | 
			
		||||
//             IGoogleApiService google,
 | 
			
		||||
//             DbService db,
 | 
			
		||||
//             LogCommandService logService)
 | 
			
		||||
//         {
 | 
			
		||||
//             _client = client;
 | 
			
		||||
//             _creds = creds;
 | 
			
		||||
//             _google = google;
 | 
			
		||||
//             _db = db;
 | 
			
		||||
//             _logService = logService;
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         //private Task Client_UserVoiceStateUpdated(SocketUser iusr, SocketVoiceState oldState, SocketVoiceState newState)
 | 
			
		||||
//         //{
 | 
			
		||||
//         //    var t = Task.Run(() =>
 | 
			
		||||
//         //    {
 | 
			
		||||
//         //        var usr = iusr as SocketGuildUser;
 | 
			
		||||
//         //        if (usr is null ||
 | 
			
		||||
//         //            oldState.VoiceChannel == newState.VoiceChannel)
 | 
			
		||||
//         //            return;
 | 
			
		||||
//
 | 
			
		||||
//         //        var player = _music.GetPlayerOrDefault(usr.Guild.Id);
 | 
			
		||||
//
 | 
			
		||||
//         //        if (player is null)
 | 
			
		||||
//         //            return;
 | 
			
		||||
//
 | 
			
		||||
//         //        try
 | 
			
		||||
//         //        {
 | 
			
		||||
//         //            //if bot moved
 | 
			
		||||
//         //            if ((player.VoiceChannel == oldState.VoiceChannel) &&
 | 
			
		||||
//         //                    usr.Id == _client.CurrentUser.Id)
 | 
			
		||||
//         //            {
 | 
			
		||||
//         //                //if (player.Paused && newState.VoiceChannel.Users.Count > 1) //unpause if there are people in the new channel
 | 
			
		||||
//         //                //    player.TogglePause();
 | 
			
		||||
//         //                //else if (!player.Paused && newState.VoiceChannel.Users.Count <= 1) // pause if there are no users in the new channel
 | 
			
		||||
//         //                //    player.TogglePause();
 | 
			
		||||
//
 | 
			
		||||
//         //               // player.SetVoiceChannel(newState.VoiceChannel);
 | 
			
		||||
//         //                return;
 | 
			
		||||
//         //            }
 | 
			
		||||
//
 | 
			
		||||
//         //            ////if some other user moved
 | 
			
		||||
//         //            //if ((player.VoiceChannel == newState.VoiceChannel && //if joined first, and player paused, unpause
 | 
			
		||||
//         //            //        player.Paused &&
 | 
			
		||||
//         //            //        newState.VoiceChannel.Users.Count >= 2) ||  // keep in mind bot is in the channel (+1)
 | 
			
		||||
//         //            //    (player.VoiceChannel == oldState.VoiceChannel && // if left last, and player unpaused, pause
 | 
			
		||||
//         //            //        !player.Paused &&
 | 
			
		||||
//         //            //        oldState.VoiceChannel.Users.Count == 1))
 | 
			
		||||
//         //            //{
 | 
			
		||||
//         //            //    player.TogglePause();
 | 
			
		||||
//         //            //    return;
 | 
			
		||||
//         //            //}
 | 
			
		||||
//         //        }
 | 
			
		||||
//         //        catch
 | 
			
		||||
//         //        {
 | 
			
		||||
//         //            // ignored
 | 
			
		||||
//         //        }
 | 
			
		||||
//         //    });
 | 
			
		||||
//         //    return Task.CompletedTask;
 | 
			
		||||
//         //}
 | 
			
		||||
//
 | 
			
		||||
//         private async Task InternalQueue(MusicPlayer mp, SongInfo songInfo, bool silent, bool queueFirst = false, bool forcePlay = false)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (songInfo is null)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (!silent)
 | 
			
		||||
//                     await ReplyErrorLocalizedAsync("song_not_found").ConfigureAwait(false);
 | 
			
		||||
//                 return;
 | 
			
		||||
//             }
 | 
			
		||||
//
 | 
			
		||||
//             int index;
 | 
			
		||||
//             try
 | 
			
		||||
//             {
 | 
			
		||||
//                 index = queueFirst
 | 
			
		||||
//                     ? mp.EnqueueNext(songInfo, forcePlay)
 | 
			
		||||
//                     : mp.Enqueue(songInfo, forcePlay);
 | 
			
		||||
//             }
 | 
			
		||||
//             catch (QueueFullException)
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyErrorLocalizedAsync("queue_full", mp.MaxQueueSize).ConfigureAwait(false);
 | 
			
		||||
//                 throw;
 | 
			
		||||
//             }
 | 
			
		||||
//             if (index != -1)
 | 
			
		||||
//             {
 | 
			
		||||
//                 if (!silent)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     try
 | 
			
		||||
//                     {
 | 
			
		||||
//                         var embed = new EmbedBuilder().WithOkColor()
 | 
			
		||||
//                                         .WithAuthor(eab => eab.WithName(GetText("queued_song") + " #" + (index + 1)).WithMusicIcon())
 | 
			
		||||
//                                         .WithDescription($"{songInfo.PrettyName}\n{GetText("queue")} ")
 | 
			
		||||
//                                         .WithFooter(ef => ef.WithText(songInfo.PrettyProvider));
 | 
			
		||||
//
 | 
			
		||||
//                         if (Uri.IsWellFormedUriString(songInfo.Thumbnail, UriKind.Absolute))
 | 
			
		||||
//                             embed.WithThumbnailUrl(songInfo.Thumbnail);
 | 
			
		||||
//
 | 
			
		||||
//                         var queuedMessage = await mp.OutputTextChannel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
//                         if (mp.Stopped)
 | 
			
		||||
//                         {
 | 
			
		||||
//                             (await ReplyErrorLocalizedAsync("queue_stopped", Format.Code(Prefix + "play")).ConfigureAwait(false)).DeleteAfter(10, _logService);
 | 
			
		||||
//                         }
 | 
			
		||||
//                         queuedMessage?.DeleteAfter(10, _logService);
 | 
			
		||||
//                     }
 | 
			
		||||
//                     catch
 | 
			
		||||
//                     {
 | 
			
		||||
//                         // ignored
 | 
			
		||||
//                     }
 | 
			
		||||
//                 }
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Play([Leftover] string query = null)
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             if (string.IsNullOrWhiteSpace(query))
 | 
			
		||||
//             {
 | 
			
		||||
//                 await Next().ConfigureAwait(false);
 | 
			
		||||
//             }
 | 
			
		||||
//             else if (int.TryParse(query, out var index))
 | 
			
		||||
//                 if (index >= 1)
 | 
			
		||||
//                     mp.SetIndex(index - 1);
 | 
			
		||||
//                 else
 | 
			
		||||
//                     return;
 | 
			
		||||
//             else
 | 
			
		||||
//             {
 | 
			
		||||
//                 try
 | 
			
		||||
//                 {
 | 
			
		||||
//                     await InternalPlay(query, forceplay: true).ConfigureAwait(false);
 | 
			
		||||
//                 }
 | 
			
		||||
//                 catch { }
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public Task Queue([Leftover] string query)
 | 
			
		||||
//             => InternalPlay(query, forceplay: false);
 | 
			
		||||
//
 | 
			
		||||
//         private async Task InternalPlay(string query, bool forceplay)
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             var songInfo = await _service.ResolveSong(query, ctx.User.ToString()).ConfigureAwait(false);
 | 
			
		||||
//             try { await InternalQueue(mp, songInfo, false, forcePlay: forceplay).ConfigureAwait(false); } catch (QueueFullException) { return; }
 | 
			
		||||
//             if ((await ctx.Guild.GetCurrentUserAsync().ConfigureAwait(false)).GetPermissions((IGuildChannel)ctx.Channel).ManageMessages)
 | 
			
		||||
//             {
 | 
			
		||||
//                 ctx.Message.DeleteAfter(10, _logService);
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task QueueNext([Leftover] string query)
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             var songInfo = await _service.ResolveSong(query, ctx.User.ToString()).ConfigureAwait(false);
 | 
			
		||||
//             try { await InternalQueue(mp, songInfo, false, true).ConfigureAwait(false); } catch (QueueFullException) { return; }
 | 
			
		||||
//             if ((await ctx.Guild.GetCurrentUserAsync().ConfigureAwait(false)).GetPermissions((IGuildChannel)ctx.Channel).ManageMessages)
 | 
			
		||||
//             {
 | 
			
		||||
//                 ctx.Message.DeleteAfter(10, _logService);
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task QueueSearch([Leftover] string query)
 | 
			
		||||
//         {
 | 
			
		||||
//             var videos = (await _google.GetVideoInfosByKeywordAsync(query, 5).ConfigureAwait(false))
 | 
			
		||||
//                 .ToArray();
 | 
			
		||||
//
 | 
			
		||||
//             if (!videos.Any())
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyErrorLocalizedAsync("song_not_found").ConfigureAwait(false);
 | 
			
		||||
//                 return;
 | 
			
		||||
//             }
 | 
			
		||||
//
 | 
			
		||||
//             var msg = await ctx.Channel.SendConfirmAsync(string.Join("\n", videos.Select((x, i) => $"`{i + 1}.`\n\t{Format.Bold(x.Name)}\n\t{x.Url}"))).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//             try
 | 
			
		||||
//             {
 | 
			
		||||
//                 var input = await GetUserInputAsync(ctx.User.Id, ctx.Channel.Id).ConfigureAwait(false);
 | 
			
		||||
//                 if (input is null
 | 
			
		||||
//                     || !int.TryParse(input, out var index)
 | 
			
		||||
//                     || (index -= 1) < 0
 | 
			
		||||
//                     || index >= videos.Length)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     _logService.AddDeleteIgnore(msg.Id);
 | 
			
		||||
//                     try { await msg.DeleteAsync().ConfigureAwait(false); } catch { }
 | 
			
		||||
//                     return;
 | 
			
		||||
//                 }
 | 
			
		||||
//
 | 
			
		||||
//                 query = videos[index].Url;
 | 
			
		||||
//
 | 
			
		||||
//                 await Queue(query).ConfigureAwait(false);
 | 
			
		||||
//             }
 | 
			
		||||
//             finally
 | 
			
		||||
//             {
 | 
			
		||||
//                 _logService.AddDeleteIgnore(msg.Id);
 | 
			
		||||
//                 try { await msg.DeleteAsync().ConfigureAwait(false); } catch { }
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task ListQueue(int page = 0)
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             var (current, songs) = mp.QueueArray();
 | 
			
		||||
//
 | 
			
		||||
//             if (!songs.Any())
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyErrorLocalizedAsync("no_player").ConfigureAwait(false);
 | 
			
		||||
//                 return;
 | 
			
		||||
//             }
 | 
			
		||||
//
 | 
			
		||||
//             if (--page < -1)
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             try { await mp.UpdateSongDurationsAsync().ConfigureAwait(false); } catch { }
 | 
			
		||||
//
 | 
			
		||||
//             const int itemsPerPage = 10;
 | 
			
		||||
//
 | 
			
		||||
//             if (page == -1)
 | 
			
		||||
//                 page = current / itemsPerPage;
 | 
			
		||||
//
 | 
			
		||||
//             //if page is 0 (-1 after this decrement) that means default to the page current song is playing from
 | 
			
		||||
//             var total = mp.TotalPlaytime;
 | 
			
		||||
//             var totalStr = total == TimeSpan.MaxValue ? "∞" : GetText("time_format",
 | 
			
		||||
//                 (int)total.TotalHours,
 | 
			
		||||
//                 total.Minutes,
 | 
			
		||||
//                 total.Seconds);
 | 
			
		||||
//             var maxPlaytime = mp.MaxPlaytimeSeconds;
 | 
			
		||||
//
 | 
			
		||||
//             EmbedBuilder printAction(int curPage)
 | 
			
		||||
//             {
 | 
			
		||||
//                 var startAt = itemsPerPage * curPage;
 | 
			
		||||
//                 var number = 0 + startAt;
 | 
			
		||||
//                 var desc = string.Join("\n", songs
 | 
			
		||||
//                         .Skip(startAt)
 | 
			
		||||
//                         .Take(itemsPerPage)
 | 
			
		||||
//                         .Select(v =>
 | 
			
		||||
//                         {
 | 
			
		||||
//                             if (number++ == current)
 | 
			
		||||
//                                 return $"**⇒**`{number}.` {v.PrettyFullName}";
 | 
			
		||||
//                             else
 | 
			
		||||
//                                 return $"`{number}.` {v.PrettyFullName}";
 | 
			
		||||
//                         }));
 | 
			
		||||
//
 | 
			
		||||
//                 desc = $"`🔊` {songs[current].PrettyFullName}\n\n" + desc;
 | 
			
		||||
//
 | 
			
		||||
//                 var add = "";
 | 
			
		||||
//                 if (mp.Stopped)
 | 
			
		||||
//                     add += Format.Bold(GetText("queue_stopped", Format.Code(Prefix + "play"))) + "\n";
 | 
			
		||||
//                 var mps = mp.MaxPlaytimeSeconds;
 | 
			
		||||
//                 if (mps > 0)
 | 
			
		||||
//                     add += Format.Bold(GetText("song_skips_after", TimeSpan.FromSeconds(mps).ToString("HH\\:mm\\:ss"))) + "\n";
 | 
			
		||||
//                 if (mp.RepeatCurrentSong)
 | 
			
		||||
//                     add += "🔂 " + GetText("repeating_cur_song") + "\n";
 | 
			
		||||
//                 else if (mp.Shuffle)
 | 
			
		||||
//                     add += "🔀 " + GetText("shuffling_playlist") + "\n";
 | 
			
		||||
//                 else
 | 
			
		||||
//                 {
 | 
			
		||||
//                     if (mp.Autoplay)
 | 
			
		||||
//                         add += "↪ " + GetText("autoplaying") + "\n";
 | 
			
		||||
//                     if (mp.FairPlay && !mp.Autoplay)
 | 
			
		||||
//                         add += " " + GetText("fairplay") + "\n";
 | 
			
		||||
//                     else if (mp.RepeatPlaylist)
 | 
			
		||||
//                         add += "🔁 " + GetText("repeating_playlist") + "\n";
 | 
			
		||||
//                 }
 | 
			
		||||
//
 | 
			
		||||
//                 if (!string.IsNullOrWhiteSpace(add))
 | 
			
		||||
//                     desc = add + "\n" + desc;
 | 
			
		||||
//
 | 
			
		||||
//                 var embed = new EmbedBuilder()
 | 
			
		||||
//                     .WithAuthor(eab => eab.WithName(GetText("player_queue", curPage + 1, (songs.Length / itemsPerPage) + 1))
 | 
			
		||||
//                         .WithMusicIcon())
 | 
			
		||||
//                     .WithDescription(desc)
 | 
			
		||||
//                     .WithFooter(ef => ef.WithText($"{mp.PrettyVolume} | {songs.Length} " +
 | 
			
		||||
//                                                   $"{("tracks".SnPl(songs.Length))} | {totalStr}"))
 | 
			
		||||
//                     .WithOkColor();
 | 
			
		||||
//
 | 
			
		||||
//                 return embed;
 | 
			
		||||
//             }
 | 
			
		||||
//
 | 
			
		||||
//             await ctx.SendPaginatedConfirmAsync(page, printAction, songs.Length,
 | 
			
		||||
//                 itemsPerPage, false).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Next(int skipCount = 1)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (skipCount < 1)
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//             mp.Next(skipCount);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Stop()
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             mp.Stop();
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task AutoDisconnect()
 | 
			
		||||
//         {
 | 
			
		||||
//             var newVal = _service.ToggleAutoDc(ctx.Guild.Id);
 | 
			
		||||
//
 | 
			
		||||
//             if (newVal)
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("autodc_enable").ConfigureAwait(false);
 | 
			
		||||
//             else
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("autodc_disable").ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Destroy()
 | 
			
		||||
//         {
 | 
			
		||||
//             await _service.DestroyPlayer(ctx.Guild.Id).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Pause()
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             mp.TogglePause();
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Volume(int val)
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             if (val < 0 || val > 100)
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyErrorLocalizedAsync("volume_input_invalid").ConfigureAwait(false);
 | 
			
		||||
//                 return;
 | 
			
		||||
//             }
 | 
			
		||||
//             mp.SetVolume(val);
 | 
			
		||||
//             await ReplyConfirmLocalizedAsync("volume_set", val).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Defvol([Leftover] int val)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (val < 0 || val > 100)
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyErrorLocalizedAsync("volume_input_invalid").ConfigureAwait(false);
 | 
			
		||||
//                 return;
 | 
			
		||||
//             }
 | 
			
		||||
//             using (var uow = _db.GetDbContext())
 | 
			
		||||
//             {
 | 
			
		||||
//                 uow.GuildConfigsForId(ctx.Guild.Id, set => set).DefaultMusicVolume = val / 100.0f;
 | 
			
		||||
//                 uow.SaveChanges();
 | 
			
		||||
//             }
 | 
			
		||||
//             await ReplyConfirmLocalizedAsync("defvol_set", val).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         [Priority(1)]
 | 
			
		||||
//         public async Task SongRemove(int index)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (index < 1)
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyErrorLocalizedAsync("removed_song_error").ConfigureAwait(false);
 | 
			
		||||
//                 return;
 | 
			
		||||
//             }
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             try
 | 
			
		||||
//             {
 | 
			
		||||
//                 var song = mp.RemoveAt(index - 1);
 | 
			
		||||
//                 var embed = new EmbedBuilder()
 | 
			
		||||
//                             .WithAuthor(eab => eab.WithName(GetText("removed_song") + " #" + (index)).WithMusicIcon())
 | 
			
		||||
//                             .WithDescription(song.PrettyName)
 | 
			
		||||
//                             .WithFooter(ef => ef.WithText(song.PrettyInfo))
 | 
			
		||||
//                             .WithErrorColor();
 | 
			
		||||
//
 | 
			
		||||
//                 await mp.OutputTextChannel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
//             }
 | 
			
		||||
//             catch (ArgumentOutOfRangeException)
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyErrorLocalizedAsync("removed_song_error").ConfigureAwait(false);
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         public enum All { All }
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         [Priority(0)]
 | 
			
		||||
//         public async Task SongRemove(All _)
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = _service.GetPlayerOrDefault(ctx.Guild.Id);
 | 
			
		||||
//             if (mp is null)
 | 
			
		||||
//                 return;
 | 
			
		||||
//             mp.Stop(true);
 | 
			
		||||
//             await ReplyConfirmLocalizedAsync("queue_cleared").ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Playlists([Leftover] int num = 1)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (num <= 0)
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             List<MusicPlaylist> playlists;
 | 
			
		||||
//
 | 
			
		||||
//             using (var uow = _db.GetDbContext())
 | 
			
		||||
//             {
 | 
			
		||||
//                 playlists = uow.MusicPlaylists.GetPlaylistsOnPage(num);
 | 
			
		||||
//             }
 | 
			
		||||
//
 | 
			
		||||
//             var embed = new EmbedBuilder()
 | 
			
		||||
//                 .WithAuthor(eab => eab.WithName(GetText("playlists_page", num)).WithMusicIcon())
 | 
			
		||||
//                 .WithDescription(string.Join("\n", playlists.Select(r =>
 | 
			
		||||
//                     GetText("playlists", r.Id, r.Name, r.Author, r.Songs.Count))))
 | 
			
		||||
//                 .WithOkColor();
 | 
			
		||||
//             await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task DeletePlaylist([Leftover] int id)
 | 
			
		||||
//         {
 | 
			
		||||
//             var success = false;
 | 
			
		||||
//             try
 | 
			
		||||
//             {
 | 
			
		||||
//                 using (var uow = _db.GetDbContext())
 | 
			
		||||
//                 {
 | 
			
		||||
//                     var pl = uow.MusicPlaylists.GetById(id);
 | 
			
		||||
//
 | 
			
		||||
//                     if (pl != null)
 | 
			
		||||
//                     {
 | 
			
		||||
//                         if (_creds.IsOwner(ctx.User) || pl.AuthorId == ctx.User.Id)
 | 
			
		||||
//                         {
 | 
			
		||||
//                             uow.MusicPlaylists.Remove(pl);
 | 
			
		||||
//                             await uow.SaveChangesAsync();
 | 
			
		||||
//                             success = true;
 | 
			
		||||
//                         }
 | 
			
		||||
//                     }
 | 
			
		||||
//                 }
 | 
			
		||||
//             }
 | 
			
		||||
//             catch (Exception ex)
 | 
			
		||||
//             {
 | 
			
		||||
//                 Log.Warning(ex, "Error deleting playlist");
 | 
			
		||||
//             }
 | 
			
		||||
//
 | 
			
		||||
//             if (!success)
 | 
			
		||||
//                 await ReplyErrorLocalizedAsync("playlist_delete_fail").ConfigureAwait(false);
 | 
			
		||||
//             else
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("playlist_deleted").ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task PlaylistShow(int id, int page = 1)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (page-- < 1)
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             MusicPlaylist mpl;
 | 
			
		||||
//             using (var uow = _db.GetDbContext())
 | 
			
		||||
//             {
 | 
			
		||||
//                 mpl = uow.MusicPlaylists.GetWithSongs(id);
 | 
			
		||||
//             }
 | 
			
		||||
//
 | 
			
		||||
//             await ctx.SendPaginatedConfirmAsync(page, (cur) =>
 | 
			
		||||
//             {
 | 
			
		||||
//                 var i = 0;
 | 
			
		||||
//                 var str = string.Join("\n", mpl.Songs
 | 
			
		||||
//                     .Skip(cur * 20)
 | 
			
		||||
//                     .Take(20)
 | 
			
		||||
//                     .Select(x => $"`{++i}.` [{x.Title.TrimTo(45)}]({x.Query}) `{x.Provider}`"));
 | 
			
		||||
//                 return new EmbedBuilder()
 | 
			
		||||
//                     .WithTitle($"\"{mpl.Name}\" by {mpl.Author}")
 | 
			
		||||
//                     .WithOkColor()
 | 
			
		||||
//                     .WithDescription(str);
 | 
			
		||||
//             }, mpl.Songs.Count, 20).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Save([Leftover] string name)
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//             var songs = mp.QueueArray().Songs
 | 
			
		||||
//                 .Select(s => new PlaylistSong()
 | 
			
		||||
//                 {
 | 
			
		||||
//                     Provider = s.Provider,
 | 
			
		||||
//                     ProviderType = s.ProviderType,
 | 
			
		||||
//                     Title = s.Title,
 | 
			
		||||
//                     Query = s.Query,
 | 
			
		||||
//                 }).ToList();
 | 
			
		||||
//
 | 
			
		||||
//             MusicPlaylist playlist;
 | 
			
		||||
//             using (var uow = _db.GetDbContext())
 | 
			
		||||
//             {
 | 
			
		||||
//                 playlist = new MusicPlaylist
 | 
			
		||||
//                 {
 | 
			
		||||
//                     Name = name,
 | 
			
		||||
//                     Author = ctx.User.Username,
 | 
			
		||||
//                     AuthorId = ctx.User.Id,
 | 
			
		||||
//                     Songs = songs.ToList(),
 | 
			
		||||
//                 };
 | 
			
		||||
//                 uow.MusicPlaylists.Add(playlist);
 | 
			
		||||
//                 await uow.SaveChangesAsync();
 | 
			
		||||
//             }
 | 
			
		||||
//
 | 
			
		||||
//             await ctx.Channel.EmbedAsync(new EmbedBuilder().WithOkColor()
 | 
			
		||||
//                 .WithTitle(GetText("playlist_saved"))
 | 
			
		||||
//                 .AddField(efb => efb.WithName(GetText("name")).WithValue(name))
 | 
			
		||||
//                 .AddField(efb => efb.WithName(GetText("id")).WithValue(playlist.Id.ToString()))).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         private static readonly ConcurrentHashSet<ulong> PlaylistLoadBlacklist = new ConcurrentHashSet<ulong>();
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Load([Leftover] int id)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (!PlaylistLoadBlacklist.Add(ctx.Guild.Id))
 | 
			
		||||
//                 return;
 | 
			
		||||
//             try
 | 
			
		||||
//             {
 | 
			
		||||
//                 var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//                 MusicPlaylist mpl;
 | 
			
		||||
//                 using (var uow = _db.GetDbContext())
 | 
			
		||||
//                 {
 | 
			
		||||
//                     mpl = uow.MusicPlaylists.GetWithSongs(id);
 | 
			
		||||
//                 }
 | 
			
		||||
//
 | 
			
		||||
//                 if (mpl is null)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     await ReplyErrorLocalizedAsync("playlist_id_not_found").ConfigureAwait(false);
 | 
			
		||||
//                     return;
 | 
			
		||||
//                 }
 | 
			
		||||
//                 IUserMessage msg = null;
 | 
			
		||||
//                 try
 | 
			
		||||
//                 {
 | 
			
		||||
//                     msg = await ctx.Channel
 | 
			
		||||
//                         .SendMessageAsync(GetText("attempting_to_queue", Format.Bold(mpl.Songs.Count.ToString())))
 | 
			
		||||
//                         .ConfigureAwait(false);
 | 
			
		||||
//                 }
 | 
			
		||||
//                 catch (Exception)
 | 
			
		||||
//                 {
 | 
			
		||||
//                 }
 | 
			
		||||
//
 | 
			
		||||
//                 foreach (var item in mpl.Songs)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     try
 | 
			
		||||
//                     {
 | 
			
		||||
//                         await Task.Yield();
 | 
			
		||||
//                         var song = await _service.ResolveSong(item.Query,
 | 
			
		||||
//                             ctx.User.ToString(),
 | 
			
		||||
//                             item.ProviderType).ConfigureAwait(false);
 | 
			
		||||
//                         var queueTask = InternalQueue(mp, song, true);
 | 
			
		||||
//                         await Task.WhenAll(Task.Delay(1000), queueTask).ConfigureAwait(false);
 | 
			
		||||
//                     }
 | 
			
		||||
//                     catch (SongNotFoundException) { }
 | 
			
		||||
//                     catch { break; }
 | 
			
		||||
//                 }
 | 
			
		||||
//                 if (msg != null)
 | 
			
		||||
//                     await msg.ModifyAsync(m => m.Content = GetText("playlist_queue_complete")).ConfigureAwait(false);
 | 
			
		||||
//             }
 | 
			
		||||
//             finally
 | 
			
		||||
//             {
 | 
			
		||||
//                 PlaylistLoadBlacklist.TryRemove(ctx.Guild.Id);
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Fairplay()
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             var val = mp.FairPlay = !mp.FairPlay;
 | 
			
		||||
//
 | 
			
		||||
//             if (val)
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("fp_enabled").ConfigureAwait(false);
 | 
			
		||||
//             }
 | 
			
		||||
//             else
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("fp_disabled").ConfigureAwait(false);
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task SongAutoDelete()
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             var val = mp.AutoDelete = !mp.AutoDelete;
 | 
			
		||||
//
 | 
			
		||||
//             _service.SetSongAutoDelete(ctx.Guild.Id, val);
 | 
			
		||||
//             if (val)
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("sad_enabled").ConfigureAwait(false);
 | 
			
		||||
//             }
 | 
			
		||||
//             else
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("sad_disabled").ConfigureAwait(false);
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task SoundCloudQueue([Leftover] string query)
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             var song = await _service.ResolveSong(query, ctx.User.ToString(), MusicType.Soundcloud).ConfigureAwait(false);
 | 
			
		||||
//             await InternalQueue(mp, song, false).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task SoundCloudPl([Leftover] string pl)
 | 
			
		||||
//         {
 | 
			
		||||
//             pl = pl?.Trim();
 | 
			
		||||
//
 | 
			
		||||
//             if (string.IsNullOrWhiteSpace(pl))
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//             using (var http = new HttpClient())
 | 
			
		||||
//             {
 | 
			
		||||
//                 var scvids = JObject.Parse(await http.GetStringAsync($"https://scapi.nadeko.bot/resolve?url={pl}").ConfigureAwait(false))["tracks"].ToObject<SoundCloudVideo[]>();
 | 
			
		||||
//                 IUserMessage msg = null;
 | 
			
		||||
//                 try { msg = await ctx.Channel.SendMessageAsync(GetText("attempting_to_queue", Format.Bold(scvids.Length.ToString()))).ConfigureAwait(false); } catch { }
 | 
			
		||||
//                 foreach (var svideo in scvids)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     try
 | 
			
		||||
//                     {
 | 
			
		||||
//                         var sinfo = await svideo.GetSongInfo().ConfigureAwait(false);
 | 
			
		||||
//                         sinfo.QueuerName = ctx.User.ToString();
 | 
			
		||||
//                         await InternalQueue(mp, sinfo, true).ConfigureAwait(false);
 | 
			
		||||
//                     }
 | 
			
		||||
//                     catch (Exception ex)
 | 
			
		||||
//                     {
 | 
			
		||||
//                         Log.Warning(ex, "Error queueing soundcloud song: {Title}", svideo.Title);
 | 
			
		||||
//                         break;
 | 
			
		||||
//                     }
 | 
			
		||||
//                 }
 | 
			
		||||
//                 if (msg != null)
 | 
			
		||||
//                     await msg.ModifyAsync(m => m.Content = GetText("playlist_queue_complete")).ConfigureAwait(false);
 | 
			
		||||
//             }
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task NowPlaying()
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             var (_, currentSong) = mp.Current;
 | 
			
		||||
//             if (currentSong is null)
 | 
			
		||||
//                 return;
 | 
			
		||||
//             try { await mp.UpdateSongDurationsAsync().ConfigureAwait(false); } catch { }
 | 
			
		||||
//
 | 
			
		||||
//             var embed = new EmbedBuilder().WithOkColor()
 | 
			
		||||
//                             .WithAuthor(eab => eab.WithName(GetText("now_playing")).WithMusicIcon())
 | 
			
		||||
//                             .WithDescription(currentSong.PrettyName)
 | 
			
		||||
//                             .WithThumbnailUrl(currentSong.Thumbnail)
 | 
			
		||||
//                             .WithFooter(ef => ef.WithText(mp.PrettyVolume + " | " + mp.PrettyFullTime + $" | {currentSong.PrettyProvider} | {currentSong.QueuerName}"));
 | 
			
		||||
//
 | 
			
		||||
//             await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task PlaylistShuffle()
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             var val = mp.ToggleShuffle();
 | 
			
		||||
//             if (val)
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("songs_shuffle_enable").ConfigureAwait(false);
 | 
			
		||||
//             else
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("songs_shuffle_disable").ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Playlist([Leftover] string playlist)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (string.IsNullOrWhiteSpace(playlist))
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//             string plId = null;
 | 
			
		||||
//             try
 | 
			
		||||
//             {
 | 
			
		||||
//                 plId = (await _google.GetPlaylistIdsByKeywordsAsync(playlist).ConfigureAwait(false)).FirstOrDefault();
 | 
			
		||||
//             }
 | 
			
		||||
//             catch (Exception ex)
 | 
			
		||||
//             {
 | 
			
		||||
//                 Log.Warning(ex.Message);
 | 
			
		||||
//             }
 | 
			
		||||
//
 | 
			
		||||
//             if (plId is null)
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyErrorLocalizedAsync("no_search_results").ConfigureAwait(false);
 | 
			
		||||
//                 return;
 | 
			
		||||
//             }
 | 
			
		||||
//             var ids = await _google.GetPlaylistTracksAsync(plId, 500).ConfigureAwait(false);
 | 
			
		||||
//             if (!ids.Any())
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyErrorLocalizedAsync("no_search_results").ConfigureAwait(false);
 | 
			
		||||
//                 return;
 | 
			
		||||
//             }
 | 
			
		||||
//             var count = ids.Count();
 | 
			
		||||
//             var msg = await ctx.Channel.SendMessageAsync("🎵 " + GetText("attempting_to_queue",
 | 
			
		||||
//                 Format.Bold(count.ToString()))).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//             foreach (var song in ids)
 | 
			
		||||
//             {
 | 
			
		||||
//                 try
 | 
			
		||||
//                 {
 | 
			
		||||
//                     if (mp.Exited)
 | 
			
		||||
//                         return;
 | 
			
		||||
//
 | 
			
		||||
//                     await Task.WhenAll(Task.Delay(150), InternalQueue(mp, await _service.ResolveSong(song, ctx.User.ToString(), MusicType.YouTube).ConfigureAwait(false), true)).ConfigureAwait(false);
 | 
			
		||||
//                 }
 | 
			
		||||
//                 catch (SongNotFoundException) { }
 | 
			
		||||
//                 catch { break; }
 | 
			
		||||
//             }
 | 
			
		||||
//
 | 
			
		||||
//             await msg.ModifyAsync(m => m.Content = "✅ " + Format.Bold(GetText("playlist_queue_complete"))).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Radio(string radioLink)
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             var song = await _service.ResolveSong(radioLink, ctx.User.ToString(), MusicType.Radio).ConfigureAwait(false);
 | 
			
		||||
//             await InternalQueue(mp, song, false).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         [OwnerOnly]
 | 
			
		||||
//         public async Task Local([Leftover] string path)
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             var song = await _service.ResolveSong(path, ctx.User.ToString(), MusicType.Local).ConfigureAwait(false);
 | 
			
		||||
//             await InternalQueue(mp, song, false).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         [OwnerOnly]
 | 
			
		||||
//         public async Task LocalPlaylist([Leftover] string dirPath)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (string.IsNullOrWhiteSpace(dirPath))
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//             DirectoryInfo dir;
 | 
			
		||||
//             try { dir = new DirectoryInfo(dirPath); } catch { return; }
 | 
			
		||||
//             var fileEnum = dir.GetFiles("*", SearchOption.AllDirectories)
 | 
			
		||||
//                                 .Where(x => !x.Attributes.HasFlag(FileAttributes.Hidden | FileAttributes.System) && x.Extension != ".jpg" && x.Extension != ".png");
 | 
			
		||||
//             foreach (var file in fileEnum)
 | 
			
		||||
//             {
 | 
			
		||||
//                 try
 | 
			
		||||
//                 {
 | 
			
		||||
//                     var song = await _service.ResolveSong(file.FullName, ctx.User.ToString(), MusicType.Local).ConfigureAwait(false);
 | 
			
		||||
//                     await InternalQueue(mp, song, true).ConfigureAwait(false);
 | 
			
		||||
//                 }
 | 
			
		||||
//                 catch (QueueFullException)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     break;
 | 
			
		||||
//                 }
 | 
			
		||||
//                 catch (Exception ex)
 | 
			
		||||
//                 {
 | 
			
		||||
//                     Log.Warning(ex, "Error resolving local song {FileName}", file);
 | 
			
		||||
//                     break;
 | 
			
		||||
//                 }
 | 
			
		||||
//             }
 | 
			
		||||
//             await ReplyConfirmLocalizedAsync("dir_queue_complete").ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Move()
 | 
			
		||||
//         {
 | 
			
		||||
//             var vch = ((IGuildUser)ctx.User).VoiceChannel;
 | 
			
		||||
//
 | 
			
		||||
//             if (vch is null)
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             var mp = _service.GetPlayerOrDefault(ctx.Guild.Id);
 | 
			
		||||
//
 | 
			
		||||
//             if (mp is null)
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             await mp.SetVoiceChannel(vch).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task MoveSong([Leftover] string fromto)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (string.IsNullOrWhiteSpace(fromto))
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             MusicPlayer mp = _service.GetPlayerOrDefault(ctx.Guild.Id);
 | 
			
		||||
//             if (mp is null)
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             fromto = fromto?.Trim();
 | 
			
		||||
//             var fromtoArr = fromto.Split('>');
 | 
			
		||||
//
 | 
			
		||||
//             SongInfo s;
 | 
			
		||||
//             if (fromtoArr.Length != 2 || !int.TryParse(fromtoArr[0], out var n1) ||
 | 
			
		||||
//                 !int.TryParse(fromtoArr[1], out var n2) || n1 < 1 || n2 < 1 || n1 == n2
 | 
			
		||||
//                 || (s = mp.MoveSong(--n1, --n2)) is null)
 | 
			
		||||
//             {
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("invalid_input").ConfigureAwait(false);
 | 
			
		||||
//                 return;
 | 
			
		||||
//             }
 | 
			
		||||
//
 | 
			
		||||
//             var embed = new EmbedBuilder()
 | 
			
		||||
//                 .WithTitle(s.Title.TrimTo(65))
 | 
			
		||||
//                 .WithUrl(s.SongUrl)
 | 
			
		||||
//                 .WithAuthor(eab => eab.WithName(GetText("song_moved")).WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png"))
 | 
			
		||||
//                 .AddField(fb => fb.WithName(GetText("from_position")).WithValue($"#{n1 + 1}").WithIsInline(true))
 | 
			
		||||
//                 .AddField(fb => fb.WithName(GetText("to_position")).WithValue($"#{n2 + 1}").WithIsInline(true))
 | 
			
		||||
//                 .WithColor(NadekoBot.OkColor);
 | 
			
		||||
//
 | 
			
		||||
//             await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
         // }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task SetMaxQueue(uint size = 0)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (size < 0)
 | 
			
		||||
//                 return;
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//             mp.MaxQueueSize = size;
 | 
			
		||||
//
 | 
			
		||||
//             if (size == 0)
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("max_queue_unlimited").ConfigureAwait(false);
 | 
			
		||||
//             else
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("max_queue_x", size).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task SetMaxPlaytime(uint seconds)
 | 
			
		||||
//         {
 | 
			
		||||
//             if (seconds < 15 && seconds != 0)
 | 
			
		||||
//                 return;
 | 
			
		||||
//
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             mp.MaxPlaytimeSeconds = seconds;
 | 
			
		||||
//             if (seconds == 0)
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("max_playtime_none").ConfigureAwait(false);
 | 
			
		||||
//             else
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("max_playtime_set", seconds).ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task ReptCurSong()
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             var (_, currentSong) = mp.Current;
 | 
			
		||||
//             if (currentSong is null)
 | 
			
		||||
//                 return;
 | 
			
		||||
//             var currentValue = mp.ToggleRepeatSong();
 | 
			
		||||
//
 | 
			
		||||
//             if (currentValue)
 | 
			
		||||
//                 await ctx.Channel.EmbedAsync(new EmbedBuilder()
 | 
			
		||||
//                     .WithOkColor()
 | 
			
		||||
//                     .WithAuthor(eab => eab.WithMusicIcon().WithName("🔂 " + GetText("repeating_track")))
 | 
			
		||||
//                     .WithDescription(currentSong.PrettyName)
 | 
			
		||||
//                     .WithFooter(ef => ef.WithText(currentSong.PrettyInfo))).ConfigureAwait(false);
 | 
			
		||||
//             else
 | 
			
		||||
//                 await ctx.Channel.SendConfirmAsync("🔂 " + GetText("repeating_track_stopped"))
 | 
			
		||||
//                                             .ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task PlaylistRepeat()
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//             var currentValue = mp.ToggleRepeatPlaylist();
 | 
			
		||||
//             if (currentValue)
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("rpl_enabled").ConfigureAwait(false);
 | 
			
		||||
//             else
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("rpl_disabled").ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         public async Task Autoplay()
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//             if (!mp.ToggleAutoplay())
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("autoplay_disabled").ConfigureAwait(false);
 | 
			
		||||
//             else
 | 
			
		||||
//                 await ReplyConfirmLocalizedAsync("autoplay_enabled").ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
//         public async Task SetMusicChannel()
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//             mp.OutputTextChannel = (ITextChannel)ctx.Channel;
 | 
			
		||||
//             _service.SetMusicChannel(ctx.Guild.Id, ctx.Channel.Id);
 | 
			
		||||
//
 | 
			
		||||
//             await ReplyConfirmLocalizedAsync("set_music_channel").ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//
 | 
			
		||||
//         [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
//         [RequireContext(ContextType.Guild)]
 | 
			
		||||
//         [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
//         public async Task UnsetMusicChannel()
 | 
			
		||||
//         {
 | 
			
		||||
//             var mp = await _service.GetOrCreatePlayer(Context).ConfigureAwait(false);
 | 
			
		||||
//
 | 
			
		||||
//             mp.OutputTextChannel = mp.OriginalTextChannel;
 | 
			
		||||
//             _service.SetMusicChannel(ctx.Guild.Id, null);
 | 
			
		||||
//
 | 
			
		||||
//             await ReplyConfirmLocalizedAsync("unset_music_channel").ConfigureAwait(false);
 | 
			
		||||
//         }
 | 
			
		||||
//     }
 | 
			
		||||
// }
 | 
			
		||||
@@ -103,7 +103,7 @@ namespace NadekoBot.Modules.NSFW
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
#if !GLOBAL_NADEKO
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(ChannelPerm.ManageMessages)]
 | 
			
		||||
@@ -151,7 +151,7 @@ namespace NadekoBot.Modules.NSFW
 | 
			
		||||
                string.Join(", ", tagsArr)).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(ChannelPerm.ManageMessages)]
 | 
			
		||||
@@ -192,7 +192,7 @@ namespace NadekoBot.Modules.NSFW
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("started", interval).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw(Group = "nsfw_or_dm"), RequireContext(ContextType.DM, Group = "nsfw_or_dm")]
 | 
			
		||||
        [UserPerm(ChannelPerm.ManageMessages)]
 | 
			
		||||
        public async Task AutoButts(int interval = 0)
 | 
			
		||||
@@ -233,12 +233,12 @@ namespace NadekoBot.Modules.NSFW
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw(Group = "nsfw_or_dm"), RequireContext(ContextType.DM, Group = "nsfw_or_dm")]
 | 
			
		||||
        public Task Hentai([Leftover] string tag = null) =>
 | 
			
		||||
            InternalHentai(ctx.Channel, tag);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw(Group = "nsfw_or_dm"), RequireContext(ContextType.DM, Group = "nsfw_or_dm")]
 | 
			
		||||
        public async Task HentaiBomb([Leftover] string tag = null)
 | 
			
		||||
        {
 | 
			
		||||
@@ -266,47 +266,47 @@ namespace NadekoBot.Modules.NSFW
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw(Group = "nsfw_or_dm"), RequireContext(ContextType.DM, Group = "nsfw_or_dm")]
 | 
			
		||||
        public Task Yandere([Leftover] string tag = null)
 | 
			
		||||
            => InternalDapiCommand(tag, DapiSearchType.Yandere, false);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw(Group = "nsfw_or_dm"), RequireContext(ContextType.DM, Group = "nsfw_or_dm")]
 | 
			
		||||
        public Task Konachan([Leftover] string tag = null)
 | 
			
		||||
            => InternalDapiCommand(tag, DapiSearchType.Konachan, false);
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw(Group = "nsfw_or_dm"), RequireContext(ContextType.DM, Group = "nsfw_or_dm")]
 | 
			
		||||
        public Task Sankaku([Leftover] string tag = null)
 | 
			
		||||
            => InternalDapiCommand(tag, DapiSearchType.Sankaku, false);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw(Group = "nsfw_or_dm"), RequireContext(ContextType.DM, Group = "nsfw_or_dm")]
 | 
			
		||||
        public Task E621([Leftover] string tag = null)
 | 
			
		||||
            => InternalDapiCommand(tag, DapiSearchType.E621, false);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw(Group = "nsfw_or_dm"), RequireContext(ContextType.DM, Group = "nsfw_or_dm")]
 | 
			
		||||
        public Task Rule34([Leftover] string tag = null)
 | 
			
		||||
            => InternalDapiCommand(tag, DapiSearchType.Rule34, false);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw(Group = "nsfw_or_dm"), RequireContext(ContextType.DM, Group = "nsfw_or_dm")]
 | 
			
		||||
        public Task Danbooru([Leftover] string tag = null)
 | 
			
		||||
            => InternalDapiCommand(tag, DapiSearchType.Danbooru, false);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw(Group = "nsfw_or_dm"), RequireContext(ContextType.DM, Group = "nsfw_or_dm")]
 | 
			
		||||
        public Task Gelbooru([Leftover] string tag = null)
 | 
			
		||||
            => InternalDapiCommand(tag, DapiSearchType.Gelbooru, false);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw(Group = "nsfw_or_dm"), RequireContext(ContextType.DM, Group = "nsfw_or_dm")]
 | 
			
		||||
        public Task Derpibooru([Leftover] string tag = null)
 | 
			
		||||
            => InternalDapiCommand(tag, DapiSearchType.Derpibooru, false);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw(Group = "nsfw_or_dm"), RequireContext(ContextType.DM, Group = "nsfw_or_dm")]
 | 
			
		||||
        public async Task Boobs()
 | 
			
		||||
        {
 | 
			
		||||
@@ -325,7 +325,7 @@ namespace NadekoBot.Modules.NSFW
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireNsfw(Group = "nsfw_or_dm"), RequireContext(ContextType.DM, Group = "nsfw_or_dm")]
 | 
			
		||||
        public async Task Butts()
 | 
			
		||||
        {
 | 
			
		||||
@@ -344,7 +344,7 @@ namespace NadekoBot.Modules.NSFW
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
        public async Task NsfwTagBlacklist([Leftover] string tag = null)
 | 
			
		||||
@@ -369,7 +369,7 @@ namespace NadekoBot.Modules.NSFW
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        public Task NsfwClearCache()
 | 
			
		||||
@@ -378,7 +378,7 @@ namespace NadekoBot.Modules.NSFW
 | 
			
		||||
            return Context.OkAsync();
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public async Task Nhentai(uint id)
 | 
			
		||||
@@ -394,7 +394,7 @@ namespace NadekoBot.Modules.NSFW
 | 
			
		||||
            await SendNhentaiGalleryInternalAsync(g);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        public async Task Nhentai([Leftover]string query)
 | 
			
		||||
 
 | 
			
		||||
@@ -79,7 +79,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                }, items.Length, 10);
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task UserBlacklist(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
@@ -89,7 +89,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                return ListBlacklistInternal(GetText("blacklisted_users"), BlacklistType.User, page);
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task ChannelBlacklist(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
@@ -99,7 +99,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                return ListBlacklistInternal(GetText("blacklisted_channels"), BlacklistType.Channel, page);
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task ServerBlacklist(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
@@ -109,27 +109,27 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                return ListBlacklistInternal(GetText("blacklisted_servers"), BlacklistType.Server, page);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task UserBlacklist(AddRemove action, ulong id)
 | 
			
		||||
                => Blacklist(action, id, BlacklistType.User);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task UserBlacklist(AddRemove action, IUser usr)
 | 
			
		||||
                => Blacklist(action, usr.Id, BlacklistType.User);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task ChannelBlacklist(AddRemove action, ulong id)
 | 
			
		||||
                => Blacklist(action, id, BlacklistType.Channel);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task ServerBlacklist(AddRemove action, ulong id)
 | 
			
		||||
                => Blacklist(action, id, BlacklistType.Server);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task ServerBlacklist(AddRemove action, IGuild guild)
 | 
			
		||||
                => Blacklist(action, guild.Id, BlacklistType.Server);
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                _db = db;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task CmdCooldown(CommandOrCrInfo command, int secs)
 | 
			
		||||
            {
 | 
			
		||||
@@ -83,7 +83,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task AllCmdCooldowns()
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                _db = db;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task FwClear()
 | 
			
		||||
@@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("fw_cleared").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task SrvrFilterInv()
 | 
			
		||||
            {
 | 
			
		||||
@@ -61,7 +61,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task ChnlFilterInv()
 | 
			
		||||
            {
 | 
			
		||||
@@ -100,7 +100,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task SrvrFilterLin()
 | 
			
		||||
            {
 | 
			
		||||
@@ -126,7 +126,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task ChnlFilterLin()
 | 
			
		||||
            {
 | 
			
		||||
@@ -165,7 +165,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task SrvrFilterWords()
 | 
			
		||||
            {
 | 
			
		||||
@@ -191,7 +191,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task ChnlFilterWords()
 | 
			
		||||
            {
 | 
			
		||||
@@ -230,7 +230,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task FilterWord([Leftover] string word)
 | 
			
		||||
            {
 | 
			
		||||
@@ -272,7 +272,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task LstFilterWords(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                _db = db;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task GlobalPermList()
 | 
			
		||||
            {
 | 
			
		||||
@@ -53,7 +53,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task GlobalModule(ModuleOrCrInfo module)
 | 
			
		||||
            {
 | 
			
		||||
@@ -70,7 +70,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("gmod_remove", Format.Bold(module.Name)).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task GlobalCommand(CommandOrCrInfo cmd)
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            _db = db;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task Verbose(PermissionAction action = null)
 | 
			
		||||
        {
 | 
			
		||||
@@ -48,7 +48,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
@@ -85,7 +85,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
 | 
			
		||||
        public enum Reset { Reset };
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
@@ -102,7 +102,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("permrole_reset").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task ListPerms(int page = 1)
 | 
			
		||||
        {
 | 
			
		||||
@@ -137,7 +137,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            await ctx.Channel.SendMessageAsync(toSend).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task RemovePerm(int index)
 | 
			
		||||
        {
 | 
			
		||||
@@ -167,7 +167,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task MovePerm(int from, int to)
 | 
			
		||||
        {
 | 
			
		||||
@@ -218,7 +218,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            await ReplyErrorLocalizedAsync("perm_out_of_range").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task SrvrCmd(CommandOrCrInfo command, PermissionAction action)
 | 
			
		||||
        {
 | 
			
		||||
@@ -246,7 +246,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task SrvrMdl(ModuleOrCrInfo module, PermissionAction action)
 | 
			
		||||
        {
 | 
			
		||||
@@ -273,7 +273,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task UsrCmd(CommandOrCrInfo command, PermissionAction action, [Leftover] IGuildUser user)
 | 
			
		||||
        {
 | 
			
		||||
@@ -303,7 +303,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task UsrMdl(ModuleOrCrInfo module, PermissionAction action, [Leftover] IGuildUser user)
 | 
			
		||||
        {
 | 
			
		||||
@@ -332,7 +332,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task RoleCmd(CommandOrCrInfo command, PermissionAction action, [Leftover] IRole role)
 | 
			
		||||
        {
 | 
			
		||||
@@ -365,7 +365,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task RoleMdl(ModuleOrCrInfo module, PermissionAction action, [Leftover] IRole role)
 | 
			
		||||
        {
 | 
			
		||||
@@ -398,7 +398,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task ChnlCmd(CommandOrCrInfo command, PermissionAction action, [Leftover] ITextChannel chnl)
 | 
			
		||||
        {
 | 
			
		||||
@@ -428,7 +428,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task ChnlMdl(ModuleOrCrInfo module, PermissionAction action, [Leftover] ITextChannel chnl)
 | 
			
		||||
        {
 | 
			
		||||
@@ -457,7 +457,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task AllChnlMdls(PermissionAction action, [Leftover] ITextChannel chnl)
 | 
			
		||||
        {
 | 
			
		||||
@@ -482,7 +482,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task AllRoleMdls(PermissionAction action, [Leftover] IRole role)
 | 
			
		||||
        {
 | 
			
		||||
@@ -510,7 +510,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task AllUsrMdls(PermissionAction action, [Leftover] IUser user)
 | 
			
		||||
        {
 | 
			
		||||
@@ -535,7 +535,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task AllSrvrMdls(PermissionAction action)
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                _perms = perms;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task ResetPerms()
 | 
			
		||||
@@ -29,7 +29,7 @@ namespace NadekoBot.Modules.Permissions
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("perms_reset").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task ResetGlobalPerms()
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class AnimeSearchCommands : NadekoSubmodule<AnimeSearchService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Novel([Leftover] string query)
 | 
			
		||||
            {
 | 
			
		||||
                if (string.IsNullOrWhiteSpace(query))
 | 
			
		||||
@@ -43,7 +43,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public async Task Mal([Leftover] string name)
 | 
			
		||||
            {
 | 
			
		||||
@@ -131,12 +131,12 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public Task Mal(IGuildUser usr) => Mal(usr.Username);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Anime([Leftover] string query)
 | 
			
		||||
            {
 | 
			
		||||
                if (string.IsNullOrWhiteSpace(query))
 | 
			
		||||
@@ -163,7 +163,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Manga([Leftover] string query)
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
    {
 | 
			
		||||
        public class CryptoCommands : NadekoSubmodule<CryptoService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Crypto(string name)
 | 
			
		||||
            {
 | 
			
		||||
                name = name?.ToUpperInvariant();
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class FeedCommands : NadekoSubmodule<FeedsService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            public async Task Feed(string url, [Leftover] ITextChannel channel = null)
 | 
			
		||||
@@ -49,7 +49,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                await ReplyErrorLocalizedAsync("feed_not_valid").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            public async Task FeedRemove(int index)
 | 
			
		||||
@@ -62,7 +62,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                    await ReplyErrorLocalizedAsync("feed_out_of_range").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            public async Task FeedList()
 | 
			
		||||
 
 | 
			
		||||
@@ -14,26 +14,26 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
        public class JokeCommands : NadekoSubmodule<SearchesService>
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Yomama()
 | 
			
		||||
            {
 | 
			
		||||
                await ctx.Channel.SendConfirmAsync(await _service.GetYomamaJoke().ConfigureAwait(false)).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Randjoke()
 | 
			
		||||
            {
 | 
			
		||||
                var (setup, punchline) = await _service.GetRandomJoke().ConfigureAwait(false);
 | 
			
		||||
                await ctx.Channel.SendConfirmAsync(setup, punchline).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task ChuckNorris()
 | 
			
		||||
            {
 | 
			
		||||
                await ctx.Channel.SendConfirmAsync(await _service.GetChuckNorrisJoke().ConfigureAwait(false)).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task WowJoke()
 | 
			
		||||
            {
 | 
			
		||||
                if (!_service.WowJokes.Any())
 | 
			
		||||
@@ -45,7 +45,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                await ctx.Channel.SendConfirmAsync(joke.Question, joke.Answer).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task MagicItem()
 | 
			
		||||
            {
 | 
			
		||||
                if (!_service.WowJokes.Any())
 | 
			
		||||
 
 | 
			
		||||
@@ -41,7 +41,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                _httpFactory = factory;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Memelist(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
                if (--page < 0)
 | 
			
		||||
@@ -72,7 +72,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Memegen(string meme, [Leftover] string memeText = null)
 | 
			
		||||
            {
 | 
			
		||||
                var memeUrl = $"http://api.memegen.link/{meme}";
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                _httpFactory = factory;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Osu(string user, [Leftover] string mode = null)
 | 
			
		||||
            {
 | 
			
		||||
                if (string.IsNullOrWhiteSpace(user))
 | 
			
		||||
@@ -89,7 +89,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Gatari(string user, [Leftover] string mode = null)
 | 
			
		||||
            {
 | 
			
		||||
                using (var http = _httpFactory.CreateClient())
 | 
			
		||||
@@ -132,7 +132,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Osu5(string user, [Leftover] string mode = null)
 | 
			
		||||
            {
 | 
			
		||||
                var channel = (ITextChannel) ctx.Channel;
 | 
			
		||||
 
 | 
			
		||||
@@ -37,7 +37,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                _httpFactory = httpFactory;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task PathOfExile(string usr, string league = "", int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
                if (--page < 0)
 | 
			
		||||
@@ -107,7 +107,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                }, characters.Count, 9, true).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task PathOfExileLeagues()
 | 
			
		||||
            {
 | 
			
		||||
                var leagues = new List<Leagues>();
 | 
			
		||||
@@ -151,7 +151,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task PathOfExileCurrency(string leagueName, string currencyName, string convertName = "Chaos Orb")
 | 
			
		||||
            {
 | 
			
		||||
                if (string.IsNullOrWhiteSpace(leagueName))
 | 
			
		||||
 
 | 
			
		||||
@@ -27,7 +27,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                Xoart, //http://xoart.link
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Placelist()
 | 
			
		||||
            {
 | 
			
		||||
                await ctx.Channel.SendConfirmAsync(GetText("list_of_place_tags", Prefix), 
 | 
			
		||||
@@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                             .ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Place(PlaceType placeType, uint width = 0, uint height = 0)
 | 
			
		||||
            {
 | 
			
		||||
                var url = "";
 | 
			
		||||
 
 | 
			
		||||
@@ -27,7 +27,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                _cache = cache;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Pokemon([Leftover] string pokemon = null)
 | 
			
		||||
            {
 | 
			
		||||
                pokemon = pokemon?.Trim().ToUpperInvariant();
 | 
			
		||||
@@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                await ReplyErrorLocalizedAsync("pokemon_none").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task PokemonAbility([Leftover] string ability = null)
 | 
			
		||||
            {
 | 
			
		||||
                ability = ability?.Trim().ToUpperInvariant().Replace(" ", "", StringComparison.InvariantCulture);
 | 
			
		||||
 
 | 
			
		||||
@@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        //for anonymasen :^)
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Rip([Leftover] IGuildUser usr)
 | 
			
		||||
        {
 | 
			
		||||
            var av = usr.RealAvatarUrl(128);
 | 
			
		||||
@@ -64,7 +64,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Weather([Leftover] string query)
 | 
			
		||||
        {
 | 
			
		||||
            if (!await ValidateQuery(ctx.Channel, query).ConfigureAwait(false))
 | 
			
		||||
@@ -106,7 +106,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Time([Leftover] string query)
 | 
			
		||||
        {
 | 
			
		||||
            if (!await ValidateQuery(ctx.Channel, query).ConfigureAwait(false))
 | 
			
		||||
@@ -152,7 +152,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            await ctx.Channel.SendMessageAsync(embed: eb.Build()).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Youtube([Leftover] string query = null)
 | 
			
		||||
        {
 | 
			
		||||
            if (!await ValidateQuery(ctx.Channel, query).ConfigureAwait(false))
 | 
			
		||||
@@ -168,7 +168,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            await ctx.Channel.SendMessageAsync(result).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Movie([Leftover] string query = null)
 | 
			
		||||
        {
 | 
			
		||||
            if (!await ValidateQuery(ctx.Channel, query).ConfigureAwait(false))
 | 
			
		||||
@@ -192,16 +192,16 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                .WithImageUrl(movie.Poster)).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public Task RandomCat() => InternalRandomImage(SearchesService.ImageTag.Cats);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public Task RandomDog() => InternalRandomImage(SearchesService.ImageTag.Dogs);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public Task RandomFood() => InternalRandomImage(SearchesService.ImageTag.Food);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public Task RandomBird() => InternalRandomImage(SearchesService.ImageTag.Birds);
 | 
			
		||||
 | 
			
		||||
        private Task InternalRandomImage(SearchesService.ImageTag tag)
 | 
			
		||||
@@ -212,7 +212,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                .WithImageUrl(url));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Image([Leftover] string query = null)
 | 
			
		||||
        {
 | 
			
		||||
            var oterms = query?.Trim();
 | 
			
		||||
@@ -265,7 +265,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Lmgtfy([Leftover] string ffs = null)
 | 
			
		||||
        {
 | 
			
		||||
            if (!await ValidateQuery(ctx.Channel, ffs).ConfigureAwait(false))
 | 
			
		||||
@@ -283,7 +283,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
 | 
			
		||||
        private static readonly ConcurrentDictionary<string, string> cachedShortenedLinks = new ConcurrentDictionary<string, string>();
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Shorten([Leftover] string query)
 | 
			
		||||
        {
 | 
			
		||||
            if (!await ValidateQuery(ctx.Channel, query).ConfigureAwait(false))
 | 
			
		||||
@@ -333,7 +333,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                .ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Google([Leftover] string query = null)
 | 
			
		||||
        {
 | 
			
		||||
            query = query?.Trim();
 | 
			
		||||
@@ -366,7 +366,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task DuckDuckGo([Leftover] string query = null)
 | 
			
		||||
        {
 | 
			
		||||
            query = query?.Trim();
 | 
			
		||||
@@ -397,7 +397,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task MagicTheGathering([Leftover] string search)
 | 
			
		||||
        {
 | 
			
		||||
            if (!await ValidateQuery(ctx.Channel, search))
 | 
			
		||||
@@ -423,7 +423,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Hearthstone([Leftover] string name)
 | 
			
		||||
        {
 | 
			
		||||
            var arg = name;
 | 
			
		||||
@@ -453,7 +453,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task UrbanDict([Leftover] string query = null)
 | 
			
		||||
        {
 | 
			
		||||
            if (!await ValidateQuery(ctx.Channel, query).ConfigureAwait(false))
 | 
			
		||||
@@ -488,7 +488,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Define([Leftover] string word)
 | 
			
		||||
        {
 | 
			
		||||
            if (!await ValidateQuery(ctx.Channel, word).ConfigureAwait(false))
 | 
			
		||||
@@ -554,7 +554,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Catfact()
 | 
			
		||||
        {
 | 
			
		||||
            using (var http = _httpFactory.CreateClient())
 | 
			
		||||
@@ -569,7 +569,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        //done in 3.0
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task Revav([Leftover] IGuildUser usr = null)
 | 
			
		||||
        {
 | 
			
		||||
@@ -584,7 +584,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        //done in 3.0
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Revimg([Leftover] string imageLink = null)
 | 
			
		||||
        {
 | 
			
		||||
            imageLink = imageLink?.Trim() ?? "";
 | 
			
		||||
@@ -594,11 +594,11 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            await ctx.Channel.SendConfirmAsync($"https://images.google.com/searchbyimage?image_url={imageLink}").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public Task Safebooru([Leftover] string tag = null)
 | 
			
		||||
            => InternalDapiCommand(ctx.Message, tag, DapiSearchType.Safebooru);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Wiki([Leftover] string query = null)
 | 
			
		||||
        {
 | 
			
		||||
            query = query?.Trim();
 | 
			
		||||
@@ -617,7 +617,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Color(params SixLabors.ImageSharp.Color[] colors)
 | 
			
		||||
        {
 | 
			
		||||
            if (!colors.Any())
 | 
			
		||||
@@ -645,7 +645,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task Avatar([Leftover] IGuildUser usr = null)
 | 
			
		||||
        {
 | 
			
		||||
@@ -666,7 +666,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                .WithThumbnailUrl(avatarUrl.ToString()), ctx.User.Mention).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Wikia(string target, [Leftover] string query)
 | 
			
		||||
        {
 | 
			
		||||
            if (string.IsNullOrWhiteSpace(target) || string.IsNullOrWhiteSpace(query))
 | 
			
		||||
@@ -707,7 +707,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task Bible(string book, string chapterAndVerse)
 | 
			
		||||
        {
 | 
			
		||||
@@ -737,7 +737,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Steam([Leftover] string query)
 | 
			
		||||
        {
 | 
			
		||||
            if (string.IsNullOrWhiteSpace(query))
 | 
			
		||||
 
 | 
			
		||||
@@ -31,7 +31,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            // private static readonly Regex picartoRegex = new Regex(@"picarto.tv/(?<name>.+[^/])/?",
 | 
			
		||||
            //     RegexOptions.Compiled | RegexOptions.IgnoreCase);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            public async Task StreamAdd(string link)
 | 
			
		||||
@@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                await ctx.Channel.EmbedAsync(embed, GetText("stream_tracked")).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
@@ -78,7 +78,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            //     await ReplyConfirmLocalizedAsync("streams_cleared", count).ConfigureAwait(false);
 | 
			
		||||
            // }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task StreamList(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
@@ -138,7 +138,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                }, streams.Count, 12).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            public async Task StreamOffline()
 | 
			
		||||
@@ -154,7 +154,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            public async Task StreamMessage(int index, [Leftover] string message)
 | 
			
		||||
@@ -180,7 +180,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            public async Task StreamMessageAll([Leftover] string message)
 | 
			
		||||
@@ -196,7 +196,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("stream_message_set_all", count);
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task StreamCheck(string url)
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                _google = google;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Translate(string langs, [Leftover] string text = null)
 | 
			
		||||
            {
 | 
			
		||||
                try
 | 
			
		||||
@@ -65,7 +65,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                Nodel
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
@@ -91,7 +91,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task AutoTransLang([Leftover] string langs = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -121,7 +121,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("atl_set", from, to).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Translangs()
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                _httpFactory = factory;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public async Task Xkcd(string arg = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -56,7 +56,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                await Xkcd(new NadekoRandom().Next(1, 1750)).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public async Task Xkcd(int num)
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
        // [Group]
 | 
			
		||||
        // public class YtTrackCommands : NadekoSubmodule<YtTrackService>
 | 
			
		||||
        // {
 | 
			
		||||
        //     [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        //     ;
 | 
			
		||||
        //     [RequireContext(ContextType.Guild)]
 | 
			
		||||
        //     public async Task YtFollow(string ytChannelId, [Leftover] string uploadMessage = null)
 | 
			
		||||
        //     {
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class CalcCommands : NadekoSubmodule
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Calculate([Leftover] string expression)
 | 
			
		||||
            {
 | 
			
		||||
                var expr = new NCalc.Expression(expression, NCalc.EvaluateOptions.IgnoreCase | NCalc.EvaluateOptions.NoCache);
 | 
			
		||||
@@ -41,7 +41,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task CalcOps()
 | 
			
		||||
            {
 | 
			
		||||
                var selection = typeof(Math).GetTypeInfo()
 | 
			
		||||
 
 | 
			
		||||
@@ -31,7 +31,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                _client = client;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task AliasesClear()
 | 
			
		||||
@@ -40,7 +40,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("aliases_cleared", count).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Alias(string trigger, [Leftover] string mapping = null)
 | 
			
		||||
@@ -117,7 +117,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task AliasList(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -29,18 +29,18 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                _selfService = selfService;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task BotConfigEdit()
 | 
			
		||||
                => Config("bot");
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public Task BotConfigEdit(string prop, [Leftover] string newValue = null)
 | 
			
		||||
                => Config("bot", prop, newValue);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task ConfigReload(string name)
 | 
			
		||||
            {
 | 
			
		||||
@@ -63,7 +63,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ctx.OkAsync();
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task Config(string name = null, string prop = null, [Leftover] string value = null)
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                _stats = stats;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task ServerInfo(string guildName = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -74,7 +74,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task ChannelInfo(ITextChannel channel = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -93,7 +93,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task UserInfo(IGuildUser usr = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -120,7 +120,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
            public async Task Activity(int page = 1)
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class InviteCommands : NadekoSubmodule<InviteService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [BotPerm(ChannelPerm.CreateInstantInvite)]
 | 
			
		||||
            [UserPerm(ChannelPerm.CreateInstantInvite)]
 | 
			
		||||
@@ -32,7 +32,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ctx.Channel.SendConfirmAsync($"{ctx.User.Mention} https://discord.gg/{invite.Code}").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [BotPerm(ChannelPerm.ManageChannel)]
 | 
			
		||||
            [UserPerm(ChannelPerm.ManageChannel)]
 | 
			
		||||
@@ -81,7 +81,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                }, invites.Count, 9).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [BotPerm(ChannelPerm.ManageChannel)]
 | 
			
		||||
            [UserPerm(ChannelPerm.ManageChannel)]
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                _creds = creds;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.DM)]
 | 
			
		||||
            public async Task ClaimPatreonRewards()
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -26,13 +26,13 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                _db = db;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public Task ListQuotes(OrderType order = OrderType.Keyword)
 | 
			
		||||
                => ListQuotes(1, order);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public async Task ListQuotes(int page = 1, OrderType order = OrderType.Keyword)
 | 
			
		||||
@@ -55,7 +55,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                    await ReplyErrorLocalizedAsync("quotes_page_none").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task QuotePrint([Leftover] string keyword)
 | 
			
		||||
            {
 | 
			
		||||
@@ -92,7 +92,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ctx.Channel.SendMessageAsync($"`#{quote.Id}` 📣 " + rep.Replace(quote.Text)?.SanitizeAllMentions()).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task QuoteShow(int id)
 | 
			
		||||
            {
 | 
			
		||||
@@ -126,7 +126,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                ).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task QuoteSearch(string keyword, [Leftover] string text)
 | 
			
		||||
            {
 | 
			
		||||
@@ -148,7 +148,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                                                       keywordquote.Text.SanitizeAllMentions()).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task QuoteId(int id)
 | 
			
		||||
            {
 | 
			
		||||
@@ -188,7 +188,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task QuoteAdd(string keyword, [Leftover] string text)
 | 
			
		||||
            {
 | 
			
		||||
@@ -213,7 +213,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("quote_added_new", Format.Code(q.Id.ToString())).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task QuoteDelete(int id)
 | 
			
		||||
            {
 | 
			
		||||
@@ -243,7 +243,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                    await ctx.Channel.SendErrorAsync(response).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task DelAllQuotes([Leftover] string keyword)
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                Here
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public async Task Remind(MeOrHere meorhere, [Leftover] string remindString)
 | 
			
		||||
            {
 | 
			
		||||
@@ -55,7 +55,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
@@ -82,7 +82,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task RemindList(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
                if (--page < 0)
 | 
			
		||||
@@ -122,7 +122,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task RemindDelete(int index)
 | 
			
		||||
            {
 | 
			
		||||
                if (--index < 0)
 | 
			
		||||
 
 | 
			
		||||
@@ -17,13 +17,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class RepeatCommands : NadekoSubmodule<RepeaterService>
 | 
			
		||||
        {
 | 
			
		||||
            // public override string RunningRepeaterToString() =>
 | 
			
		||||
            //     $"{Channel?.Mention ?? $"⚠<#{Repeater.ChannelId}>"} " +
 | 
			
		||||
            //     (this.Repeater.NoRedundant ? "| ✍" : "") +
 | 
			
		||||
            //     $"| {(int) Repeater.Interval.TotalHours}:{Repeater.Interval:mm} " +
 | 
			
		||||
            //     $"| {Repeater.Message.TrimTo(33)}";
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            public async Task RepeatInvoke(int index)
 | 
			
		||||
@@ -38,7 +32,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            public async Task RepeatRemove(int index)
 | 
			
		||||
@@ -60,7 +54,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                    .WithDescription(description));
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            public async Task RepeatRedundant(int index)
 | 
			
		||||
@@ -86,28 +80,28 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            [Priority(-1)]
 | 
			
		||||
            public Task Repeat([Leftover]string message)
 | 
			
		||||
                => Repeat(null, null, message);
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public Task Repeat(StoopidTime interval, [Leftover]string message)
 | 
			
		||||
                => Repeat(null, interval, message);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public Task Repeat(GuildDateTime dt, [Leftover] string message)
 | 
			
		||||
                => Repeat(dt, null, message);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            [Priority(2)]
 | 
			
		||||
@@ -156,7 +150,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                    .WithDescription(description));
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            public async Task RepeatList()
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
    {
 | 
			
		||||
        public class StreamRoleCommands : NadekoSubmodule<StreamRoleService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
@@ -23,7 +23,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("stream_role_enabled", Format.Bold(fromRole.ToString()), Format.Bold(addRole.ToString())).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
@@ -33,7 +33,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("stream_role_disabled").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
@@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                    await ReplyConfirmLocalizedAsync("stream_role_kw_set", Format.Bold(kw)).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
@@ -68,7 +68,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                        await ReplyErrorLocalizedAsync("stream_role_bl_rem_fail", Format.Bold(user.ToString())).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [BotPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class UnitConverterCommands : NadekoSubmodule<ConverterService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task ConvertList()
 | 
			
		||||
            {
 | 
			
		||||
                var units = _service.Units;
 | 
			
		||||
@@ -29,7 +29,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ctx.Channel.EmbedAsync(res).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public async Task Convert(string origin, string target, decimal value)
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -37,7 +37,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
@@ -65,14 +65,14 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        public Task Say([Leftover] string message) =>
 | 
			
		||||
            Say((ITextChannel)ctx.Channel, message);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task WhosPlaying([Leftover] string game)
 | 
			
		||||
        {
 | 
			
		||||
@@ -104,7 +104,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        public async Task InRole(int page, [Leftover] IRole role = null)
 | 
			
		||||
@@ -136,7 +136,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
            }, roleUsers.Length, 20).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public Task InRole([Leftover] IRole role = null)
 | 
			
		||||
@@ -144,7 +144,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
 | 
			
		||||
        public enum MeOrBot { Me, Bot }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task CheckPerms(MeOrBot who = MeOrBot.Me)
 | 
			
		||||
        {
 | 
			
		||||
@@ -160,7 +160,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
            await ctx.Channel.SendConfirmAsync(builder.ToString()).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task UserId([Leftover] IGuildUser target = null)
 | 
			
		||||
        {
 | 
			
		||||
@@ -169,7 +169,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                Format.Code(usr.Id.ToString())).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task RoleId([Leftover] IRole role)
 | 
			
		||||
        {
 | 
			
		||||
@@ -177,14 +177,14 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                Format.Code(role.Id.ToString())).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task ChannelId()
 | 
			
		||||
        {
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("channelid", "🆔", Format.Code(ctx.Channel.Id.ToString()))
 | 
			
		||||
                .ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task ServerId()
 | 
			
		||||
        {
 | 
			
		||||
@@ -192,7 +192,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                .ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task Roles(IGuildUser target, int page = 1)
 | 
			
		||||
        {
 | 
			
		||||
@@ -233,12 +233,12 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public Task Roles(int page = 1) =>
 | 
			
		||||
            Roles(null, page);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task ChannelTopic([Leftover]ITextChannel channel = null)
 | 
			
		||||
        {
 | 
			
		||||
@@ -252,7 +252,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ctx.Channel.SendConfirmAsync(GetText("channel_topic"), topic).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Stats()
 | 
			
		||||
        {
 | 
			
		||||
            var ownerIds = string.Join("\n", _creds.OwnerIds);
 | 
			
		||||
@@ -277,7 +277,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                            _coord.GetGuildCount(), _stats.TextChannels, _stats.VoiceChannels)).WithIsInline(true))).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task Showemojis([Leftover] string _) // need to have the parameter so that the message.tags gets populated
 | 
			
		||||
        {
 | 
			
		||||
            var tags = ctx.Message.Tags.Where(t => t.Type == TagType.Emoji).Select(t => (Emote)t.Value);
 | 
			
		||||
@@ -290,7 +290,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                await ctx.Channel.SendMessageAsync(result.TrimTo(2000)).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        public async Task ListServers(int page = 1)
 | 
			
		||||
        {
 | 
			
		||||
@@ -317,7 +317,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        public async Task SaveChat(int cnt)
 | 
			
		||||
@@ -358,7 +358,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
        }
 | 
			
		||||
        private static SemaphoreSlim sem = new SemaphoreSlim(1, 1);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
#if GLOBAL_NADEKO
 | 
			
		||||
        [Ratelimit(30)]
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
        [Group]
 | 
			
		||||
        public class VerboseErrorCommands : NadekoSubmodule<VerboseErrorsService>
 | 
			
		||||
        {
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.ManageMessages)]
 | 
			
		||||
            public async Task VerboseError(bool? newstate = null)
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                _xps = xps;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task ClubTransfer([Leftover] IUser newOwner)
 | 
			
		||||
            {
 | 
			
		||||
                var club = _service.TransferClub(ctx.User, newOwner);
 | 
			
		||||
@@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                    await ReplyErrorLocalizedAsync("club_transfer_failed").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task ClubAdmin([Leftover] IUser toAdmin)
 | 
			
		||||
            {
 | 
			
		||||
                bool admin;
 | 
			
		||||
@@ -58,7 +58,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                        .ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task ClubCreate([Leftover] string clubName)
 | 
			
		||||
            {
 | 
			
		||||
                if (string.IsNullOrWhiteSpace(clubName) || clubName.Length > 20)
 | 
			
		||||
@@ -76,7 +76,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("club_created", Format.Bold(club.ToString())).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task ClubIcon([Leftover] string url = null)
 | 
			
		||||
            {
 | 
			
		||||
                if ((!Uri.IsWellFormedUriString(url, UriKind.Absolute) && url != null)
 | 
			
		||||
@@ -89,7 +89,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("club_icon_set").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public async Task ClubInformation(IUser user = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -104,7 +104,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                await ClubInformation(club.ToString()).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public async Task ClubInformation([Leftover] string clubName = null)
 | 
			
		||||
            {
 | 
			
		||||
@@ -164,7 +164,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                }, club.Users.Count, 10).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public Task ClubBans(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
                if (--page < 0)
 | 
			
		||||
@@ -195,7 +195,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public Task ClubApps(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
                if (--page < 0)
 | 
			
		||||
@@ -225,7 +225,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                    }, apps.Length, 10);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task ClubApply([Leftover] string clubName)
 | 
			
		||||
            {
 | 
			
		||||
                if (string.IsNullOrWhiteSpace(clubName))
 | 
			
		||||
@@ -248,12 +248,12 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public Task ClubAccept(IUser user)
 | 
			
		||||
                => ClubAccept(user.ToString());
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public async Task ClubAccept([Leftover] string userName)
 | 
			
		||||
            {
 | 
			
		||||
@@ -266,7 +266,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                    await ReplyErrorLocalizedAsync("club_accept_error").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task Clubleave()
 | 
			
		||||
            {
 | 
			
		||||
                if (_service.LeaveClub(ctx.User))
 | 
			
		||||
@@ -275,12 +275,12 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                    await ReplyErrorLocalizedAsync("club_not_in_club").ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public Task ClubKick([Leftover] IUser user)
 | 
			
		||||
                => ClubKick(user.ToString());
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public Task ClubKick([Leftover] string userName)
 | 
			
		||||
            {
 | 
			
		||||
@@ -291,12 +291,12 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                    return ReplyErrorLocalizedAsync("club_user_kick_fail");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public Task ClubBan([Leftover] IUser user)
 | 
			
		||||
                => ClubBan(user.ToString());
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public Task ClubBan([Leftover] string userName)
 | 
			
		||||
            {
 | 
			
		||||
@@ -307,12 +307,12 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                    return ReplyErrorLocalizedAsync("club_user_ban_fail");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(1)]
 | 
			
		||||
            public Task ClubUnBan([Leftover] IUser user)
 | 
			
		||||
                => ClubUnBan(user.ToString());
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public Task ClubUnBan([Leftover] string userName)
 | 
			
		||||
            {
 | 
			
		||||
@@ -323,7 +323,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                    return ReplyErrorLocalizedAsync("club_user_unban_fail");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task ClubLevelReq(int level)
 | 
			
		||||
            {
 | 
			
		||||
                if (_service.ChangeClubLevelReq(ctx.User.Id, level))
 | 
			
		||||
@@ -337,7 +337,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task ClubDescription([Leftover] string desc = null)
 | 
			
		||||
            {
 | 
			
		||||
                if (_service.ChangeClubDescription(ctx.User.Id, desc))
 | 
			
		||||
@@ -351,7 +351,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public async Task ClubDisband()
 | 
			
		||||
            {
 | 
			
		||||
                if (_service.Disband(ctx.User.Id, out ClubInfo club))
 | 
			
		||||
@@ -365,7 +365,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            public Task ClubLeaderboard(int page = 1)
 | 
			
		||||
            {
 | 
			
		||||
                if (--page < 0)
 | 
			
		||||
 
 | 
			
		||||
@@ -11,13 +11,13 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
        public class ResetCommands : NadekoSubmodule<XpService>
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public Task XpReset(IGuildUser user)
 | 
			
		||||
                => XpReset(user.Id);
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task XpReset(ulong userId)
 | 
			
		||||
@@ -34,7 +34,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                await ReplyConfirmLocalizedAsync("reset_user", userId).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task XpReset()
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
            _gss = gss;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task Experience([Leftover] IUser user = null)
 | 
			
		||||
        {
 | 
			
		||||
@@ -38,7 +38,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        public async Task XpRewsReset()
 | 
			
		||||
        {
 | 
			
		||||
            var reply = await PromptUserConfirmAsync(new EmbedBuilder()
 | 
			
		||||
@@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
            await ctx.OkAsync();
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public Task XpLevelUpRewards(int page = 1)
 | 
			
		||||
        {
 | 
			
		||||
@@ -121,7 +121,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
            Rem = 1,
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [Priority(2)]
 | 
			
		||||
@@ -131,7 +131,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("xp_role_reward_cleared", level).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
@@ -151,7 +151,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
                    Format.Bold(role.ToString()));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        public async Task XpCurrencyReward(int level, int amount = 0)
 | 
			
		||||
@@ -193,7 +193,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
            return GetText("xpn_notif_disabled");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task XpNotify()
 | 
			
		||||
        {
 | 
			
		||||
@@ -208,7 +208,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
            await Context.Channel.EmbedAsync(embed);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task XpNotify(NotifyPlace place, XpNotificationLocation type)
 | 
			
		||||
        {
 | 
			
		||||
@@ -222,7 +222,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
 | 
			
		||||
        public enum Server { Server };
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
        public async Task XpExclude(Server _)
 | 
			
		||||
@@ -234,7 +234,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
 | 
			
		||||
        public enum Role { Role };
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageRoles)]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task XpExclude(Role _, [Leftover] IRole role)
 | 
			
		||||
@@ -246,7 +246,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
 | 
			
		||||
        public enum Channel { Channel };
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageChannels)]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task XpExclude(Channel _, [Leftover] IChannel channel = null)
 | 
			
		||||
@@ -259,7 +259,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
            await ReplyConfirmLocalizedAsync((ex ? "excluded" : "not_excluded"), Format.Bold(channel.ToString())).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task XpExclusionList()
 | 
			
		||||
        {
 | 
			
		||||
@@ -297,14 +297,14 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
            }, lines.Length, 15);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [NadekoOptions(typeof(LbOpts))]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public Task XpLeaderboard(params string[] args)
 | 
			
		||||
            => XpLeaderboard(1, args);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [NadekoOptions(typeof(LbOpts))]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
@@ -371,7 +371,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
            }, 900, 9, addPaginatedFooter: false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task XpGlobalLeaderboard(int page = 1)
 | 
			
		||||
        {
 | 
			
		||||
@@ -399,7 +399,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
            await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
        public async Task XpAdd(int amount, ulong userId)
 | 
			
		||||
@@ -413,13 +413,13 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
            await ReplyConfirmLocalizedAsync("modified", Format.Bold(usr), Format.Bold(amount.ToString())).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
        public Task XpAdd(int amount, [Leftover] IGuildUser user)
 | 
			
		||||
            => XpAdd(amount, user.Id);
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        public async Task XpTemplateReload()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user