- 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

@@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Gambling
private IUserMessage raceMessage = null;
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[NadekoOptionsAttribute(typeof(RaceOptions))]
public Task Race(params string[] args)
@@ -136,7 +136,7 @@ namespace NadekoBot.Modules.Gambling
return ReplyErrorLocalizedAsync("animal_race_failed");
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task JoinRace(ShmartNumber amount = default)
{

View File

@@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Gambling
_db = db;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task BlackJack(ShmartNumber amount)
{
@@ -157,15 +157,15 @@ namespace NadekoBot.Modules.Gambling
return $"{playerName} | Bet: {x.Bet}\n";
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public Task Hit() => InternalBlackJack(BjAction.Hit);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public Task Stand() => InternalBlackJack(BjAction.Stand);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public Task Double() => InternalBlackJack(BjAction.Double);

View File

@@ -30,7 +30,7 @@ namespace NadekoBot.Modules.Gambling
_cs = cs;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[NadekoOptionsAttribute(typeof(Connect4Game.Options))]
public async Task Connect4(params string[] args)

View File

@@ -26,7 +26,7 @@ namespace NadekoBot.Modules.Gambling
{
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[NadekoOptionsAttribute(typeof(EventOptions))]
[OwnerOnly]

View File

@@ -20,13 +20,13 @@ namespace NadekoBot.Modules.Gambling
{
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(0)]
public Task RaffleCur(Mixed _, ShmartNumber amount) =>
RaffleCur(amount, true);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(1)]
public async Task RaffleCur(ShmartNumber amount, bool mixed = false)

View File

@@ -31,7 +31,7 @@ namespace NadekoBot.Modules.Gambling
_images = data.LocalImages;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Roll()
{
var rng = new NadekoRandom();
@@ -51,7 +51,7 @@ namespace NadekoBot.Modules.Gambling
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(1)]
public async Task Roll(int num)
{
@@ -59,21 +59,21 @@ namespace NadekoBot.Modules.Gambling
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(1)]
public async Task Rolluo(int num = 1)
{
await InternalRoll(num, false).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(0)]
public async Task Roll(string arg)
{
await InternallDndRoll(arg, true).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(0)]
public async Task Rolluo(string arg)
{
@@ -184,7 +184,7 @@ namespace NadekoBot.Modules.Gambling
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task NRoll([Leftover] string range)
{
int rolled;

View File

@@ -72,7 +72,7 @@ namespace NadekoBot.Modules.Gambling
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Draw(int num = 1)
{
@@ -88,7 +88,7 @@ namespace NadekoBot.Modules.Gambling
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task DrawNew(int num = 1)
{
if (num < 1)
@@ -103,7 +103,7 @@ namespace NadekoBot.Modules.Gambling
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task DeckShuffle()
{

View File

@@ -33,7 +33,7 @@ namespace NadekoBot.Modules.Gambling
_db = db;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Flip(int count = 1)
{
if (count > 10 || count < 1)
@@ -85,7 +85,7 @@ namespace NadekoBot.Modules.Gambling
Tails = 2
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Betflip(ShmartNumber amount, BetFlipGuess guess)
{
if (!await CheckBetMandatory(amount).ConfigureAwait(false) || amount == 1)

View File

@@ -54,7 +54,7 @@ namespace NadekoBot.Modules.Gambling
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Economy()
{
var ec = _service.GetEconomy();
@@ -77,7 +77,7 @@ namespace NadekoBot.Modules.Gambling
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Timely()
{
var val = _config.Timely.Amount;
@@ -100,7 +100,7 @@ namespace NadekoBot.Modules.Gambling
await ReplyConfirmLocalizedAsync("timely", n(val) + CurrencySign, period).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[OwnerOnly]
public async Task TimelyReset()
{
@@ -108,7 +108,7 @@ namespace NadekoBot.Modules.Gambling
await ReplyConfirmLocalizedAsync("timely_reset").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[OwnerOnly]
public async Task TimelySet(int amount, int period = 24)
{
@@ -127,7 +127,7 @@ namespace NadekoBot.Modules.Gambling
await ReplyConfirmLocalizedAsync("timely_set", Format.Bold(n(amount) + CurrencySign), Format.Bold(period.ToString())).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Raffle([Leftover] IRole role = null)
{
@@ -143,7 +143,7 @@ namespace NadekoBot.Modules.Gambling
await ctx.Channel.SendConfirmAsync("🎟 " + GetText("raffled_user"), $"**{usr.Username}#{usr.Discriminator}**", footer: $"ID: {usr.Id}").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task RaffleAny([Leftover] IRole role = null)
{
@@ -159,7 +159,7 @@ namespace NadekoBot.Modules.Gambling
await ctx.Channel.SendConfirmAsync("🎟 " + GetText("raffled_user"), $"**{usr.Username}#{usr.Discriminator}**", footer: $"ID: {usr.Id}").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(1)]
public async Task Cash([Leftover] IUser user = null)
{
@@ -167,18 +167,18 @@ namespace NadekoBot.Modules.Gambling
await ConfirmLocalizedAsync("has", Format.Bold(user.ToString()), $"{GetCurrency(user.Id)} {CurrencySign}").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(2)]
public Task CurrencyTransactions(int page = 1) =>
InternalCurrencyTransactions(ctx.User.Id, page);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[OwnerOnly]
[Priority(0)]
public Task CurrencyTransactions([Leftover] IUser usr) =>
InternalCurrencyTransactions(usr.Id, 1);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[OwnerOnly]
[Priority(1)]
public Task CurrencyTransactions(IUser usr, int page) =>
@@ -213,14 +213,14 @@ namespace NadekoBot.Modules.Gambling
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(0)]
public async Task Cash(ulong userId)
{
await ReplyConfirmLocalizedAsync("has", Format.Code(userId.ToString()), $"{GetCurrency(userId)} {CurrencySign}").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(0)]
public async Task Give(ShmartNumber amount, IGuildUser receiver, [Leftover] string msg = null)
@@ -238,27 +238,27 @@ namespace NadekoBot.Modules.Gambling
.ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(1)]
public Task Give(ShmartNumber amount, [Leftover] IGuildUser receiver)
=> Give(amount, receiver, null);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[OwnerOnly]
[Priority(0)]
public Task Award(ShmartNumber amount, IGuildUser usr, [Leftover] string msg) =>
Award(amount, usr.Id, msg);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[OwnerOnly]
[Priority(1)]
public Task Award(ShmartNumber amount, [Leftover] IGuildUser usr) =>
Award(amount, usr.Id);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[OwnerOnly]
[Priority(2)]
public async Task Award(ShmartNumber amount, ulong usrId, [Leftover] string msg = null)
@@ -273,7 +273,7 @@ namespace NadekoBot.Modules.Gambling
await ReplyConfirmLocalizedAsync("awarded", n(amount) + CurrencySign, $"<@{usrId}>").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[OwnerOnly]
[Priority(2)]
@@ -295,7 +295,7 @@ namespace NadekoBot.Modules.Gambling
Format.Bold(role.Name)).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[OwnerOnly]
[Priority(0)]
@@ -315,7 +315,7 @@ namespace NadekoBot.Modules.Gambling
Format.Bold(role.Name)).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[OwnerOnly]
[Priority(1)]
@@ -332,7 +332,7 @@ namespace NadekoBot.Modules.Gambling
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[OwnerOnly]
public async Task Take(ShmartNumber amount, [Leftover] ulong usrId)
{
@@ -348,7 +348,7 @@ namespace NadekoBot.Modules.Gambling
private IUserMessage rdMsg = null;
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task RollDuel(IUser u)
{
@@ -363,7 +363,7 @@ namespace NadekoBot.Modules.Gambling
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task RollDuel(ShmartNumber amount, IUser u)
{
@@ -488,17 +488,17 @@ namespace NadekoBot.Modules.Gambling
await ctx.Channel.SendConfirmAsync(str).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public Task BetRoll(ShmartNumber amount)
=> InternallBetroll(amount);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[NadekoOptions(typeof(LbOpts))]
[Priority(0)]
public Task Leaderboard(params string[] args)
=> Leaderboard(1, args);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[NadekoOptions(typeof(LbOpts))]
[Priority(1)]
public async Task Leaderboard(int page = 1, params string[] args)
@@ -598,7 +598,7 @@ namespace NadekoBot.Modules.Gambling
Draw,
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Rps(RpsPick pick, ShmartNumber amount = default)
{
long oldAmount = amount;

View File

@@ -76,7 +76,7 @@ namespace NadekoBot.Modules.Gambling
}, entries.Count, 9, true);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public Task Shop(int page = 1)
{
@@ -86,7 +86,7 @@ namespace NadekoBot.Modules.Gambling
return ShopInternalAsync(page);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Buy(int index)
{
@@ -219,7 +219,7 @@ namespace NadekoBot.Modules.Gambling
private static long GetProfitAmount(int price) =>
(int)(Math.Ceiling(0.90 * price));
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
[BotPerm(GuildPerm.ManageRoles)]
@@ -249,7 +249,7 @@ namespace NadekoBot.Modules.Gambling
.WithTitle(GetText("shop_item_add"))).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task ShopAdd(List _, int price, [Leftover]string name)
@@ -277,7 +277,7 @@ namespace NadekoBot.Modules.Gambling
.WithTitle(GetText("shop_item_add"))).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task ShopListAdd(int index, [Leftover] string itemText)
@@ -316,7 +316,7 @@ namespace NadekoBot.Modules.Gambling
await ReplyConfirmLocalizedAsync("shop_list_item_added").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task ShopRemove(int index)
@@ -348,7 +348,7 @@ namespace NadekoBot.Modules.Gambling
.WithTitle(GetText("shop_item_rm"))).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task ShopChangePrice(int index, int price)
@@ -368,7 +368,7 @@ namespace NadekoBot.Modules.Gambling
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task ShopChangeName(int index, [Leftover] string newName)
@@ -388,7 +388,7 @@ namespace NadekoBot.Modules.Gambling
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task ShopSwap(int index1, int index2)
@@ -408,7 +408,7 @@ namespace NadekoBot.Modules.Gambling
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task ShopMove(int fromIndex, int toIndex)

View File

@@ -87,7 +87,7 @@ namespace NadekoBot.Modules.Gambling
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[OwnerOnly]
public async Task SlotStats()
{
@@ -108,7 +108,7 @@ namespace NadekoBot.Modules.Gambling
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[OwnerOnly]
public async Task SlotTest(int tests = 1000)
{
@@ -137,7 +137,7 @@ namespace NadekoBot.Modules.Gambling
footer: $"Total Bet: {tests * bet} | Payout: {payout * bet} | {payout * 1.0f / tests * 100}%").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Slot(ShmartNumber amount)
{
if (!_runningUsers.Add(ctx.User.Id))

View File

@@ -21,7 +21,7 @@ namespace NadekoBot.Modules.Gambling
{
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task WaifuReset()
{
var price = _service.GetResetPrice(ctx.User);
@@ -40,7 +40,7 @@ namespace NadekoBot.Modules.Gambling
await ReplyErrorLocalizedAsync("waifu_reset_fail");
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task WaifuClaim(int amount, [Leftover]IUser target)
{
@@ -78,7 +78,7 @@ namespace NadekoBot.Modules.Gambling
await ctx.Channel.SendConfirmAsync(ctx.User.Mention + msg);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(0)]
public async Task WaifuTransfer(ulong waifuId, IUser newOwner)
@@ -96,7 +96,7 @@ namespace NadekoBot.Modules.Gambling
Format.Bold(newOwner.ToString()));
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(1)]
public async Task WaifuTransfer(IUser waifu, IUser newOwner)
@@ -113,7 +113,7 @@ namespace NadekoBot.Modules.Gambling
Format.Bold(newOwner.ToString()));
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(-1)]
public Task Divorce([Leftover] string target)
@@ -127,13 +127,13 @@ namespace NadekoBot.Modules.Gambling
return Divorce(waifuUserId);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(0)]
public Task Divorce([Leftover]IGuildUser target)
=> Divorce(target.Id);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(1)]
public async Task Divorce([Leftover]ulong targetId)
@@ -163,7 +163,7 @@ namespace NadekoBot.Modules.Gambling
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Affinity([Leftover]IGuildUser u = null)
{
@@ -201,7 +201,7 @@ namespace NadekoBot.Modules.Gambling
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task WaifuLb(int page = 1)
{
@@ -235,7 +235,7 @@ namespace NadekoBot.Modules.Gambling
await ctx.Channel.EmbedAsync(embed);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(1)]
public Task WaifuInfo([Leftover]IUser target = null)
@@ -246,7 +246,7 @@ namespace NadekoBot.Modules.Gambling
return InternalWaifuInfo(target.Id, target.ToString());
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(0)]
public Task WaifuInfo(ulong targetId)
@@ -301,7 +301,7 @@ namespace NadekoBot.Modules.Gambling
return ctx.Channel.EmbedAsync(embed);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(1)]
public async Task WaifuGift(int page = 1)
@@ -326,7 +326,7 @@ namespace NadekoBot.Modules.Gambling
}, waifuItems.Count, 9);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(0)]
public async Task WaifuGift(string itemName, [Leftover] IUser waifu)

View File

@@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Gambling
_db = db;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task WheelOfFortune(ShmartNumber amount)
{
if (!await CheckBetMandatory(amount).ConfigureAwait(false))