- removed unused attributes on commands

- Removed some commented out files
This commit is contained in:
Kwoth
2021-06-21 02:24:11 +02:00
parent 49f9b96755
commit 656db01aca
89 changed files with 569 additions and 2918 deletions

View File

@@ -14,7 +14,7 @@ namespace NadekoBot.Modules.Utility
[Group]
public class CalcCommands : NadekoSubmodule
{
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Calculate([Leftover] string expression)
{
var expr = new NCalc.Expression(expression, NCalc.EvaluateOptions.IgnoreCase | NCalc.EvaluateOptions.NoCache);
@@ -41,7 +41,7 @@ namespace NadekoBot.Modules.Utility
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task CalcOps()
{
var selection = typeof(Math).GetTypeInfo()

View File

@@ -31,7 +31,7 @@ namespace NadekoBot.Modules.Utility
_client = client;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task AliasesClear()
@@ -40,7 +40,7 @@ namespace NadekoBot.Modules.Utility
await ReplyConfirmLocalizedAsync("aliases_cleared", count).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[UserPerm(GuildPerm.Administrator)]
[RequireContext(ContextType.Guild)]
public async Task Alias(string trigger, [Leftover] string mapping = null)
@@ -117,7 +117,7 @@ namespace NadekoBot.Modules.Utility
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task AliasList(int page = 1)
{

View File

@@ -29,18 +29,18 @@ namespace NadekoBot.Modules.Utility
_selfService = selfService;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[OwnerOnly]
public Task BotConfigEdit()
=> Config("bot");
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(0)]
[OwnerOnly]
public Task BotConfigEdit(string prop, [Leftover] string newValue = null)
=> Config("bot", prop, newValue);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[OwnerOnly]
public async Task ConfigReload(string name)
{
@@ -63,7 +63,7 @@ namespace NadekoBot.Modules.Utility
await ctx.OkAsync();
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[OwnerOnly]
public async Task Config(string name = null, string prop = null, [Leftover] string value = null)
{

View File

@@ -25,7 +25,7 @@ namespace NadekoBot.Modules.Utility
_stats = stats;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task ServerInfo(string guildName = null)
{
@@ -74,7 +74,7 @@ namespace NadekoBot.Modules.Utility
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task ChannelInfo(ITextChannel channel = null)
{
@@ -93,7 +93,7 @@ namespace NadekoBot.Modules.Utility
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task UserInfo(IGuildUser usr = null)
{
@@ -120,7 +120,7 @@ namespace NadekoBot.Modules.Utility
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[OwnerOnly]
public async Task Activity(int page = 1)

View File

@@ -15,7 +15,7 @@ namespace NadekoBot.Modules.Utility
[Group]
public class InviteCommands : NadekoSubmodule<InviteService>
{
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[BotPerm(ChannelPerm.CreateInstantInvite)]
[UserPerm(ChannelPerm.CreateInstantInvite)]
@@ -32,7 +32,7 @@ namespace NadekoBot.Modules.Utility
await ctx.Channel.SendConfirmAsync($"{ctx.User.Mention} https://discord.gg/{invite.Code}").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[BotPerm(ChannelPerm.ManageChannel)]
[UserPerm(ChannelPerm.ManageChannel)]
@@ -81,7 +81,7 @@ namespace NadekoBot.Modules.Utility
}, invites.Count, 9).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[BotPerm(ChannelPerm.ManageChannel)]
[UserPerm(ChannelPerm.ManageChannel)]

View File

@@ -21,7 +21,7 @@ namespace NadekoBot.Modules.Utility
_creds = creds;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.DM)]
public async Task ClaimPatreonRewards()
{

View File

@@ -26,13 +26,13 @@ namespace NadekoBot.Modules.Utility
_db = db;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(1)]
public Task ListQuotes(OrderType order = OrderType.Keyword)
=> ListQuotes(1, order);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(0)]
public async Task ListQuotes(int page = 1, OrderType order = OrderType.Keyword)
@@ -55,7 +55,7 @@ namespace NadekoBot.Modules.Utility
await ReplyErrorLocalizedAsync("quotes_page_none").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task QuotePrint([Leftover] string keyword)
{
@@ -92,7 +92,7 @@ namespace NadekoBot.Modules.Utility
await ctx.Channel.SendMessageAsync($"`#{quote.Id}` 📣 " + rep.Replace(quote.Text)?.SanitizeAllMentions()).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task QuoteShow(int id)
{
@@ -126,7 +126,7 @@ namespace NadekoBot.Modules.Utility
).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task QuoteSearch(string keyword, [Leftover] string text)
{
@@ -148,7 +148,7 @@ namespace NadekoBot.Modules.Utility
keywordquote.Text.SanitizeAllMentions()).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task QuoteId(int id)
{
@@ -188,7 +188,7 @@ namespace NadekoBot.Modules.Utility
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task QuoteAdd(string keyword, [Leftover] string text)
{
@@ -213,7 +213,7 @@ namespace NadekoBot.Modules.Utility
await ReplyConfirmLocalizedAsync("quote_added_new", Format.Code(q.Id.ToString())).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task QuoteDelete(int id)
{
@@ -243,7 +243,7 @@ namespace NadekoBot.Modules.Utility
await ctx.Channel.SendErrorAsync(response).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task DelAllQuotes([Leftover] string keyword)

View File

@@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Utility
Here
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(1)]
public async Task Remind(MeOrHere meorhere, [Leftover] string remindString)
{
@@ -55,7 +55,7 @@ namespace NadekoBot.Modules.Utility
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
[Priority(0)]
@@ -82,7 +82,7 @@ namespace NadekoBot.Modules.Utility
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task RemindList(int page = 1)
{
if (--page < 0)
@@ -122,7 +122,7 @@ namespace NadekoBot.Modules.Utility
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task RemindDelete(int index)
{
if (--index < 0)

View File

@@ -17,13 +17,7 @@ namespace NadekoBot.Modules.Utility
[Group]
public class RepeatCommands : NadekoSubmodule<RepeaterService>
{
// public override string RunningRepeaterToString() =>
// $"{Channel?.Mention ?? $"⚠<#{Repeater.ChannelId}>"} " +
// (this.Repeater.NoRedundant ? "| ✍" : "") +
// $"| {(int) Repeater.Interval.TotalHours}:{Repeater.Interval:mm} " +
// $"| {Repeater.Message.TrimTo(33)}";
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
public async Task RepeatInvoke(int index)
@@ -38,7 +32,7 @@ namespace NadekoBot.Modules.Utility
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
public async Task RepeatRemove(int index)
@@ -60,7 +54,7 @@ namespace NadekoBot.Modules.Utility
.WithDescription(description));
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
public async Task RepeatRedundant(int index)
@@ -86,28 +80,28 @@ namespace NadekoBot.Modules.Utility
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
[Priority(-1)]
public Task Repeat([Leftover]string message)
=> Repeat(null, null, message);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
[Priority(0)]
public Task Repeat(StoopidTime interval, [Leftover]string message)
=> Repeat(null, interval, message);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
[Priority(1)]
public Task Repeat(GuildDateTime dt, [Leftover] string message)
=> Repeat(dt, null, message);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
[Priority(2)]
@@ -156,7 +150,7 @@ namespace NadekoBot.Modules.Utility
.WithDescription(description));
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
public async Task RepeatList()

View File

@@ -12,7 +12,7 @@ namespace NadekoBot.Modules.Utility
{
public class StreamRoleCommands : NadekoSubmodule<StreamRoleService>
{
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[BotPerm(GuildPerm.ManageRoles)]
[UserPerm(GuildPerm.ManageRoles)]
[RequireContext(ContextType.Guild)]
@@ -23,7 +23,7 @@ namespace NadekoBot.Modules.Utility
await ReplyConfirmLocalizedAsync("stream_role_enabled", Format.Bold(fromRole.ToString()), Format.Bold(addRole.ToString())).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[BotPerm(GuildPerm.ManageRoles)]
[UserPerm(GuildPerm.ManageRoles)]
[RequireContext(ContextType.Guild)]
@@ -33,7 +33,7 @@ namespace NadekoBot.Modules.Utility
await ReplyConfirmLocalizedAsync("stream_role_disabled").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[BotPerm(GuildPerm.ManageRoles)]
[UserPerm(GuildPerm.ManageRoles)]
[RequireContext(ContextType.Guild)]
@@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Utility
await ReplyConfirmLocalizedAsync("stream_role_kw_set", Format.Bold(kw)).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[BotPerm(GuildPerm.ManageRoles)]
[UserPerm(GuildPerm.ManageRoles)]
[RequireContext(ContextType.Guild)]
@@ -68,7 +68,7 @@ namespace NadekoBot.Modules.Utility
await ReplyErrorLocalizedAsync("stream_role_bl_rem_fail", Format.Bold(user.ToString())).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[BotPerm(GuildPerm.ManageRoles)]
[UserPerm(GuildPerm.ManageRoles)]
[RequireContext(ContextType.Guild)]

View File

@@ -15,7 +15,7 @@ namespace NadekoBot.Modules.Utility
[Group]
public class UnitConverterCommands : NadekoSubmodule<ConverterService>
{
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task ConvertList()
{
var units = _service.Units;
@@ -29,7 +29,7 @@ namespace NadekoBot.Modules.Utility
await ctx.Channel.EmbedAsync(res).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(0)]
public async Task Convert(string origin, string target, decimal value)
{

View File

@@ -37,7 +37,7 @@ namespace NadekoBot.Modules.Utility
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
[Priority(1)]
@@ -65,14 +65,14 @@ namespace NadekoBot.Modules.Utility
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
[Priority(0)]
public Task Say([Leftover] string message) =>
Say((ITextChannel)ctx.Channel, message);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task WhosPlaying([Leftover] string game)
{
@@ -104,7 +104,7 @@ namespace NadekoBot.Modules.Utility
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(0)]
public async Task InRole(int page, [Leftover] IRole role = null)
@@ -136,7 +136,7 @@ namespace NadekoBot.Modules.Utility
}, roleUsers.Length, 20).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(1)]
public Task InRole([Leftover] IRole role = null)
@@ -144,7 +144,7 @@ namespace NadekoBot.Modules.Utility
public enum MeOrBot { Me, Bot }
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task CheckPerms(MeOrBot who = MeOrBot.Me)
{
@@ -160,7 +160,7 @@ namespace NadekoBot.Modules.Utility
await ctx.Channel.SendConfirmAsync(builder.ToString()).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task UserId([Leftover] IGuildUser target = null)
{
@@ -169,7 +169,7 @@ namespace NadekoBot.Modules.Utility
Format.Code(usr.Id.ToString())).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task RoleId([Leftover] IRole role)
{
@@ -177,14 +177,14 @@ namespace NadekoBot.Modules.Utility
Format.Code(role.Id.ToString())).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task ChannelId()
{
await ReplyConfirmLocalizedAsync("channelid", "🆔", Format.Code(ctx.Channel.Id.ToString()))
.ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task ServerId()
{
@@ -192,7 +192,7 @@ namespace NadekoBot.Modules.Utility
.ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Roles(IGuildUser target, int page = 1)
{
@@ -233,12 +233,12 @@ namespace NadekoBot.Modules.Utility
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public Task Roles(int page = 1) =>
Roles(null, page);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task ChannelTopic([Leftover]ITextChannel channel = null)
{
@@ -252,7 +252,7 @@ namespace NadekoBot.Modules.Utility
await ctx.Channel.SendConfirmAsync(GetText("channel_topic"), topic).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Stats()
{
var ownerIds = string.Join("\n", _creds.OwnerIds);
@@ -277,7 +277,7 @@ namespace NadekoBot.Modules.Utility
_coord.GetGuildCount(), _stats.TextChannels, _stats.VoiceChannels)).WithIsInline(true))).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Showemojis([Leftover] string _) // need to have the parameter so that the message.tags gets populated
{
var tags = ctx.Message.Tags.Where(t => t.Type == TagType.Emoji).Select(t => (Emote)t.Value);
@@ -290,7 +290,7 @@ namespace NadekoBot.Modules.Utility
await ctx.Channel.SendMessageAsync(result.TrimTo(2000)).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[OwnerOnly]
public async Task ListServers(int page = 1)
{
@@ -317,7 +317,7 @@ namespace NadekoBot.Modules.Utility
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[OwnerOnly]
public async Task SaveChat(int cnt)
@@ -358,7 +358,7 @@ namespace NadekoBot.Modules.Utility
}
private static SemaphoreSlim sem = new SemaphoreSlim(1, 1);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
#if GLOBAL_NADEKO
[Ratelimit(30)]
#endif

View File

@@ -11,7 +11,7 @@ namespace NadekoBot.Modules.Utility
[Group]
public class VerboseErrorCommands : NadekoSubmodule<VerboseErrorsService>
{
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
public async Task VerboseError(bool? newstate = null)