- 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

@@ -16,7 +16,7 @@ namespace NadekoBot.Modules.Searches
[Group]
public class AnimeSearchCommands : NadekoSubmodule<AnimeSearchService>
{
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Novel([Leftover] string query)
{
if (string.IsNullOrWhiteSpace(query))
@@ -43,7 +43,7 @@ namespace NadekoBot.Modules.Searches
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(0)]
public async Task Mal([Leftover] string name)
{
@@ -131,12 +131,12 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(1)]
public Task Mal(IGuildUser usr) => Mal(usr.Username);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Anime([Leftover] string query)
{
if (string.IsNullOrWhiteSpace(query))
@@ -163,7 +163,7 @@ namespace NadekoBot.Modules.Searches
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Manga([Leftover] string query)
{

View File

@@ -10,7 +10,7 @@ namespace NadekoBot.Modules.Searches
{
public class CryptoCommands : NadekoSubmodule<CryptoService>
{
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Crypto(string name)
{
name = name?.ToUpperInvariant();

View File

@@ -15,7 +15,7 @@ namespace NadekoBot.Modules.Searches
[Group]
public class FeedCommands : NadekoSubmodule<FeedsService>
{
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
public async Task Feed(string url, [Leftover] ITextChannel channel = null)
@@ -49,7 +49,7 @@ namespace NadekoBot.Modules.Searches
await ReplyErrorLocalizedAsync("feed_not_valid").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
public async Task FeedRemove(int index)
@@ -62,7 +62,7 @@ namespace NadekoBot.Modules.Searches
await ReplyErrorLocalizedAsync("feed_out_of_range").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
public async Task FeedList()

View File

@@ -14,26 +14,26 @@ namespace NadekoBot.Modules.Searches
public class JokeCommands : NadekoSubmodule<SearchesService>
{
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Yomama()
{
await ctx.Channel.SendConfirmAsync(await _service.GetYomamaJoke().ConfigureAwait(false)).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Randjoke()
{
var (setup, punchline) = await _service.GetRandomJoke().ConfigureAwait(false);
await ctx.Channel.SendConfirmAsync(setup, punchline).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task ChuckNorris()
{
await ctx.Channel.SendConfirmAsync(await _service.GetChuckNorrisJoke().ConfigureAwait(false)).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task WowJoke()
{
if (!_service.WowJokes.Any())
@@ -45,7 +45,7 @@ namespace NadekoBot.Modules.Searches
await ctx.Channel.SendConfirmAsync(joke.Question, joke.Answer).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task MagicItem()
{
if (!_service.WowJokes.Any())

View File

@@ -41,7 +41,7 @@ namespace NadekoBot.Modules.Searches
_httpFactory = factory;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Memelist(int page = 1)
{
if (--page < 0)
@@ -72,7 +72,7 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Memegen(string meme, [Leftover] string memeText = null)
{
var memeUrl = $"http://api.memegen.link/{meme}";

View File

@@ -29,7 +29,7 @@ namespace NadekoBot.Modules.Searches
_httpFactory = factory;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Osu(string user, [Leftover] string mode = null)
{
if (string.IsNullOrWhiteSpace(user))
@@ -89,7 +89,7 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Gatari(string user, [Leftover] string mode = null)
{
using (var http = _httpFactory.CreateClient())
@@ -132,7 +132,7 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Osu5(string user, [Leftover] string mode = null)
{
var channel = (ITextChannel) ctx.Channel;

View File

@@ -37,7 +37,7 @@ namespace NadekoBot.Modules.Searches
_httpFactory = httpFactory;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task PathOfExile(string usr, string league = "", int page = 1)
{
if (--page < 0)
@@ -107,7 +107,7 @@ namespace NadekoBot.Modules.Searches
}, characters.Count, 9, true).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task PathOfExileLeagues()
{
var leagues = new List<Leagues>();
@@ -151,7 +151,7 @@ namespace NadekoBot.Modules.Searches
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task PathOfExileCurrency(string leagueName, string currencyName, string convertName = "Chaos Orb")
{
if (string.IsNullOrWhiteSpace(leagueName))

View File

@@ -27,7 +27,7 @@ namespace NadekoBot.Modules.Searches
Xoart, //http://xoart.link
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Placelist()
{
await ctx.Channel.SendConfirmAsync(GetText("list_of_place_tags", Prefix),
@@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Searches
.ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Place(PlaceType placeType, uint width = 0, uint height = 0)
{
var url = "";

View File

@@ -27,7 +27,7 @@ namespace NadekoBot.Modules.Searches
_cache = cache;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Pokemon([Leftover] string pokemon = null)
{
pokemon = pokemon?.Trim().ToUpperInvariant();
@@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Searches
await ReplyErrorLocalizedAsync("pokemon_none").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task PokemonAbility([Leftover] string ability = null)
{
ability = ability?.Trim().ToUpperInvariant().Replace(" ", "", StringComparison.InvariantCulture);

View File

@@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Searches
}
//for anonymasen :^)
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Rip([Leftover] IGuildUser usr)
{
var av = usr.RealAvatarUrl(128);
@@ -64,7 +64,7 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Weather([Leftover] string query)
{
if (!await ValidateQuery(ctx.Channel, query).ConfigureAwait(false))
@@ -106,7 +106,7 @@ namespace NadekoBot.Modules.Searches
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Time([Leftover] string query)
{
if (!await ValidateQuery(ctx.Channel, query).ConfigureAwait(false))
@@ -152,7 +152,7 @@ namespace NadekoBot.Modules.Searches
await ctx.Channel.SendMessageAsync(embed: eb.Build()).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Youtube([Leftover] string query = null)
{
if (!await ValidateQuery(ctx.Channel, query).ConfigureAwait(false))
@@ -168,7 +168,7 @@ namespace NadekoBot.Modules.Searches
await ctx.Channel.SendMessageAsync(result).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Movie([Leftover] string query = null)
{
if (!await ValidateQuery(ctx.Channel, query).ConfigureAwait(false))
@@ -192,16 +192,16 @@ namespace NadekoBot.Modules.Searches
.WithImageUrl(movie.Poster)).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public Task RandomCat() => InternalRandomImage(SearchesService.ImageTag.Cats);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public Task RandomDog() => InternalRandomImage(SearchesService.ImageTag.Dogs);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public Task RandomFood() => InternalRandomImage(SearchesService.ImageTag.Food);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public Task RandomBird() => InternalRandomImage(SearchesService.ImageTag.Birds);
private Task InternalRandomImage(SearchesService.ImageTag tag)
@@ -212,7 +212,7 @@ namespace NadekoBot.Modules.Searches
.WithImageUrl(url));
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Image([Leftover] string query = null)
{
var oterms = query?.Trim();
@@ -265,7 +265,7 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Lmgtfy([Leftover] string ffs = null)
{
if (!await ValidateQuery(ctx.Channel, ffs).ConfigureAwait(false))
@@ -283,7 +283,7 @@ namespace NadekoBot.Modules.Searches
private static readonly ConcurrentDictionary<string, string> cachedShortenedLinks = new ConcurrentDictionary<string, string>();
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Shorten([Leftover] string query)
{
if (!await ValidateQuery(ctx.Channel, query).ConfigureAwait(false))
@@ -333,7 +333,7 @@ namespace NadekoBot.Modules.Searches
.ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Google([Leftover] string query = null)
{
query = query?.Trim();
@@ -366,7 +366,7 @@ namespace NadekoBot.Modules.Searches
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task DuckDuckGo([Leftover] string query = null)
{
query = query?.Trim();
@@ -397,7 +397,7 @@ namespace NadekoBot.Modules.Searches
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task MagicTheGathering([Leftover] string search)
{
if (!await ValidateQuery(ctx.Channel, search))
@@ -423,7 +423,7 @@ namespace NadekoBot.Modules.Searches
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Hearthstone([Leftover] string name)
{
var arg = name;
@@ -453,7 +453,7 @@ namespace NadekoBot.Modules.Searches
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task UrbanDict([Leftover] string query = null)
{
if (!await ValidateQuery(ctx.Channel, query).ConfigureAwait(false))
@@ -488,7 +488,7 @@ namespace NadekoBot.Modules.Searches
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Define([Leftover] string word)
{
if (!await ValidateQuery(ctx.Channel, word).ConfigureAwait(false))
@@ -554,7 +554,7 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Catfact()
{
using (var http = _httpFactory.CreateClient())
@@ -569,7 +569,7 @@ namespace NadekoBot.Modules.Searches
}
//done in 3.0
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Revav([Leftover] IGuildUser usr = null)
{
@@ -584,7 +584,7 @@ namespace NadekoBot.Modules.Searches
}
//done in 3.0
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Revimg([Leftover] string imageLink = null)
{
imageLink = imageLink?.Trim() ?? "";
@@ -594,11 +594,11 @@ namespace NadekoBot.Modules.Searches
await ctx.Channel.SendConfirmAsync($"https://images.google.com/searchbyimage?image_url={imageLink}").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public Task Safebooru([Leftover] string tag = null)
=> InternalDapiCommand(ctx.Message, tag, DapiSearchType.Safebooru);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Wiki([Leftover] string query = null)
{
query = query?.Trim();
@@ -617,7 +617,7 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Color(params SixLabors.ImageSharp.Color[] colors)
{
if (!colors.Any())
@@ -645,7 +645,7 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Avatar([Leftover] IGuildUser usr = null)
{
@@ -666,7 +666,7 @@ namespace NadekoBot.Modules.Searches
.WithThumbnailUrl(avatarUrl.ToString()), ctx.User.Mention).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Wikia(string target, [Leftover] string query)
{
if (string.IsNullOrWhiteSpace(target) || string.IsNullOrWhiteSpace(query))
@@ -707,7 +707,7 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Bible(string book, string chapterAndVerse)
{
@@ -737,7 +737,7 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Steam([Leftover] string query)
{
if (string.IsNullOrWhiteSpace(query))

View File

@@ -31,7 +31,7 @@ namespace NadekoBot.Modules.Searches
// private static readonly Regex picartoRegex = new Regex(@"picarto.tv/(?<name>.+[^/])/?",
// RegexOptions.Compiled | RegexOptions.IgnoreCase);
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
public async Task StreamAdd(string link)
@@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Searches
await ctx.Channel.EmbedAsync(embed, GetText("stream_tracked")).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
[Priority(1)]
@@ -78,7 +78,7 @@ namespace NadekoBot.Modules.Searches
// await ReplyConfirmLocalizedAsync("streams_cleared", count).ConfigureAwait(false);
// }
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task StreamList(int page = 1)
{
@@ -138,7 +138,7 @@ namespace NadekoBot.Modules.Searches
}, streams.Count, 12).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
public async Task StreamOffline()
@@ -154,7 +154,7 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
public async Task StreamMessage(int index, [Leftover] string message)
@@ -180,7 +180,7 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.ManageMessages)]
public async Task StreamMessageAll([Leftover] string message)
@@ -196,7 +196,7 @@ namespace NadekoBot.Modules.Searches
await ReplyConfirmLocalizedAsync("stream_message_set_all", count);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task StreamCheck(string url)
{

View File

@@ -23,7 +23,7 @@ namespace NadekoBot.Modules.Searches
_google = google;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
public async Task Translate(string langs, [Leftover] string text = null)
{
try
@@ -65,7 +65,7 @@ namespace NadekoBot.Modules.Searches
Nodel
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
[OwnerOnly]
@@ -91,7 +91,7 @@ namespace NadekoBot.Modules.Searches
}
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task AutoTransLang([Leftover] string langs = null)
{
@@ -121,7 +121,7 @@ namespace NadekoBot.Modules.Searches
await ReplyConfirmLocalizedAsync("atl_set", from, to).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Translangs()
{

View File

@@ -22,7 +22,7 @@ namespace NadekoBot.Modules.Searches
_httpFactory = factory;
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(0)]
public async Task Xkcd(string arg = null)
{
@@ -56,7 +56,7 @@ namespace NadekoBot.Modules.Searches
await Xkcd(new NadekoRandom().Next(1, 1750)).ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[NadekoCommand, Aliases]
[Priority(1)]
public async Task Xkcd(int num)
{

View File

@@ -9,7 +9,7 @@ namespace NadekoBot.Modules.Searches
// [Group]
// public class YtTrackCommands : NadekoSubmodule<YtTrackService>
// {
// [NadekoCommand, Usage, Description, Aliases]
// ;
// [RequireContext(ContextType.Guild)]
// public async Task YtFollow(string ytChannelId, [Leftover] string uploadMessage = null)
// {