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