- 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

@@ -23,7 +23,7 @@ namespace NadekoBot.Modules.Xp
_xps = xps;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task ClubTransfer([Leftover] IUser newOwner)
{
var club = _service.TransferClub(ctx.User, newOwner);
@@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Xp
await ReplyErrorLocalizedAsync("club_transfer_failed").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task ClubAdmin([Leftover] IUser toAdmin)
{
bool admin;
@@ -58,7 +58,7 @@ namespace NadekoBot.Modules.Xp
.ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task ClubCreate([Leftover] string clubName)
{
if (string.IsNullOrWhiteSpace(clubName) || clubName.Length > 20)
@@ -76,7 +76,7 @@ namespace NadekoBot.Modules.Xp
await ReplyConfirmLocalizedAsync("club_created", Format.Bold(club.ToString())).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task ClubIcon([Leftover] string url = null)
{
if ((!Uri.IsWellFormedUriString(url, UriKind.Absolute) && url != null)
@@ -89,7 +89,7 @@ namespace NadekoBot.Modules.Xp
await ReplyConfirmLocalizedAsync("club_icon_set").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(1)]
public async Task ClubInformation(IUser user = null)
{
@@ -104,7 +104,7 @@ namespace NadekoBot.Modules.Xp
await ClubInformation(club.ToString()).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(0)]
public async Task ClubInformation([Leftover] string clubName = null)
{
@@ -164,7 +164,7 @@ namespace NadekoBot.Modules.Xp
}, club.Users.Count, 10).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public Task ClubBans(int page = 1)
{
if (--page < 0)
@@ -195,7 +195,7 @@ namespace NadekoBot.Modules.Xp
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public Task ClubApps(int page = 1)
{
if (--page < 0)
@@ -225,7 +225,7 @@ namespace NadekoBot.Modules.Xp
}, apps.Length, 10);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task ClubApply([Leftover] string clubName)
{
if (string.IsNullOrWhiteSpace(clubName))
@@ -248,12 +248,12 @@ namespace NadekoBot.Modules.Xp
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(1)]
public Task ClubAccept(IUser user)
=> ClubAccept(user.ToString());
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(0)]
public async Task ClubAccept([Leftover] string userName)
{
@@ -266,7 +266,7 @@ namespace NadekoBot.Modules.Xp
await ReplyErrorLocalizedAsync("club_accept_error").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Clubleave()
{
if (_service.LeaveClub(ctx.User))
@@ -275,12 +275,12 @@ namespace NadekoBot.Modules.Xp
await ReplyErrorLocalizedAsync("club_not_in_club").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(1)]
public Task ClubKick([Leftover] IUser user)
=> ClubKick(user.ToString());
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(0)]
public Task ClubKick([Leftover] string userName)
{
@@ -291,12 +291,12 @@ namespace NadekoBot.Modules.Xp
return ReplyErrorLocalizedAsync("club_user_kick_fail");
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(1)]
public Task ClubBan([Leftover] IUser user)
=> ClubBan(user.ToString());
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(0)]
public Task ClubBan([Leftover] string userName)
{
@@ -307,12 +307,12 @@ namespace NadekoBot.Modules.Xp
return ReplyErrorLocalizedAsync("club_user_ban_fail");
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(1)]
public Task ClubUnBan([Leftover] IUser user)
=> ClubUnBan(user.ToString());
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(0)]
public Task ClubUnBan([Leftover] string userName)
{
@@ -323,7 +323,7 @@ namespace NadekoBot.Modules.Xp
return ReplyErrorLocalizedAsync("club_user_unban_fail");
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task ClubLevelReq(int level)
{
if (_service.ChangeClubLevelReq(ctx.User.Id, level))
@@ -337,7 +337,7 @@ namespace NadekoBot.Modules.Xp
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task ClubDescription([Leftover] string desc = null)
{
if (_service.ChangeClubDescription(ctx.User.Id, desc))
@@ -351,7 +351,7 @@ namespace NadekoBot.Modules.Xp
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task ClubDisband()
{
if (_service.Disband(ctx.User.Id, out ClubInfo club))
@@ -365,7 +365,7 @@ namespace NadekoBot.Modules.Xp
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public Task ClubLeaderboard(int page = 1)
{
if (--page < 0)

View File

@@ -11,13 +11,13 @@ namespace NadekoBot.Modules.Xp
public class ResetCommands : NadekoSubmodule<XpService>
{
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public Task XpReset(IGuildUser user)
=> XpReset(user.Id);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task XpReset(ulong userId)
@@ -34,7 +34,7 @@ namespace NadekoBot.Modules.Xp
await ReplyConfirmLocalizedAsync("reset_user", userId).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task XpReset()

View File

@@ -24,7 +24,7 @@ namespace NadekoBot.Modules.Xp
_gss = gss;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Experience([Leftover] IUser user = null)
{
@@ -38,7 +38,7 @@ namespace NadekoBot.Modules.Xp
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task XpRewsReset()
{
var reply = await PromptUserConfirmAsync(new EmbedBuilder()
@@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Xp
await ctx.OkAsync();
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public Task XpLevelUpRewards(int page = 1)
{
@@ -121,7 +121,7 @@ namespace NadekoBot.Modules.Xp
Rem = 1,
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[UserPerm(GuildPerm.Administrator)]
[RequireContext(ContextType.Guild)]
[Priority(2)]
@@ -131,7 +131,7 @@ namespace NadekoBot.Modules.Xp
await ReplyConfirmLocalizedAsync("xp_role_reward_cleared", level).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[UserPerm(GuildPerm.Administrator)]
[RequireContext(ContextType.Guild)]
[Priority(1)]
@@ -151,7 +151,7 @@ namespace NadekoBot.Modules.Xp
Format.Bold(role.ToString()));
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[OwnerOnly]
public async Task XpCurrencyReward(int level, int amount = 0)
@@ -193,7 +193,7 @@ namespace NadekoBot.Modules.Xp
return GetText("xpn_notif_disabled");
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task XpNotify()
{
@@ -208,7 +208,7 @@ namespace NadekoBot.Modules.Xp
await Context.Channel.EmbedAsync(embed);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task XpNotify(NotifyPlace place, XpNotificationLocation type)
{
@@ -222,7 +222,7 @@ namespace NadekoBot.Modules.Xp
public enum Server { Server };
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task XpExclude(Server _)
@@ -234,7 +234,7 @@ namespace NadekoBot.Modules.Xp
public enum Role { Role };
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[UserPerm(GuildPerm.ManageRoles)]
[RequireContext(ContextType.Guild)]
public async Task XpExclude(Role _, [Leftover] IRole role)
@@ -246,7 +246,7 @@ namespace NadekoBot.Modules.Xp
public enum Channel { Channel };
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[UserPerm(GuildPerm.ManageChannels)]
[RequireContext(ContextType.Guild)]
public async Task XpExclude(Channel _, [Leftover] IChannel channel = null)
@@ -259,7 +259,7 @@ namespace NadekoBot.Modules.Xp
await ReplyConfirmLocalizedAsync((ex ? "excluded" : "not_excluded"), Format.Bold(channel.ToString())).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task XpExclusionList()
{
@@ -297,14 +297,14 @@ namespace NadekoBot.Modules.Xp
}, lines.Length, 15);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[NadekoOptions(typeof(LbOpts))]
[Priority(0)]
[RequireContext(ContextType.Guild)]
public Task XpLeaderboard(params string[] args)
=> XpLeaderboard(1, args);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[NadekoOptions(typeof(LbOpts))]
[Priority(1)]
[RequireContext(ContextType.Guild)]
@@ -371,7 +371,7 @@ namespace NadekoBot.Modules.Xp
}, 900, 9, addPaginatedFooter: false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task XpGlobalLeaderboard(int page = 1)
{
@@ -399,7 +399,7 @@ namespace NadekoBot.Modules.Xp
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task XpAdd(int amount, ulong userId)
@@ -413,13 +413,13 @@ namespace NadekoBot.Modules.Xp
await ReplyConfirmLocalizedAsync("modified", Format.Bold(usr), Format.Bold(amount.ToString())).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public Task XpAdd(int amount, [Leftover] IGuildUser user)
=> XpAdd(amount, user.Id);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[OwnerOnly]
public async Task XpTemplateReload()