mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
Removed cmd source generator. Commands are no longer partial methods. Compilations should be slightly faster now. Updated packages and adapted drawing code to the new apis. There may be some bugs.
This commit is contained in:
@@ -41,7 +41,7 @@ public partial class Searches
|
||||
|
||||
[Cmd]
|
||||
[Priority(0)]
|
||||
public async partial Task Mal([Leftover] string name)
|
||||
public async Task Mal([Leftover] string name)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
return;
|
||||
@@ -135,11 +135,11 @@ public partial class Searches
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[Priority(1)]
|
||||
public partial Task Mal(IGuildUser usr)
|
||||
public Task Mal(IGuildUser usr)
|
||||
=> Mal(usr.Username);
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Anime([Leftover] string query)
|
||||
public async Task Anime([Leftover] string query)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(query))
|
||||
return;
|
||||
@@ -171,7 +171,7 @@ public partial class Searches
|
||||
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async partial Task Manga([Leftover] string query)
|
||||
public async Task Manga([Leftover] string query)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(query))
|
||||
return;
|
||||
|
@@ -18,7 +18,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Stock([Leftover]string query)
|
||||
public async Task Stock([Leftover]string query)
|
||||
{
|
||||
using var typing = ctx.Channel.EnterTypingState();
|
||||
|
||||
@@ -116,7 +116,7 @@ public partial class Searches
|
||||
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Crypto(string name)
|
||||
public async Task Crypto(string name)
|
||||
{
|
||||
name = name?.ToUpperInvariant();
|
||||
|
||||
|
@@ -16,7 +16,7 @@ public partial class Searches
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.ManageMessages)]
|
||||
public partial Task YtUploadNotif(string url, [Leftover] ITextChannel channel = null)
|
||||
public Task YtUploadNotif(string url, [Leftover] ITextChannel channel = null)
|
||||
{
|
||||
var m = _ytChannelRegex.Match(url);
|
||||
if (!m.Success)
|
||||
@@ -30,7 +30,7 @@ public partial class Searches
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.ManageMessages)]
|
||||
public async partial Task Feed(string url, [Leftover] ITextChannel channel = null)
|
||||
public async Task Feed(string url, [Leftover] ITextChannel channel = null)
|
||||
{
|
||||
var success = Uri.TryCreate(url, UriKind.Absolute, out var uri)
|
||||
&& (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps);
|
||||
@@ -64,7 +64,7 @@ public partial class Searches
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.ManageMessages)]
|
||||
public async partial Task FeedRemove(int index)
|
||||
public async Task FeedRemove(int index)
|
||||
{
|
||||
if (_service.RemoveFeed(ctx.Guild.Id, --index))
|
||||
await ReplyConfirmLocalizedAsync(strs.feed_removed);
|
||||
@@ -75,7 +75,7 @@ public partial class Searches
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.ManageMessages)]
|
||||
public async partial Task FeedList()
|
||||
public async Task FeedList()
|
||||
{
|
||||
var feeds = _service.GetFeeds(ctx.Guild.Id);
|
||||
|
||||
|
@@ -9,22 +9,22 @@ public partial class Searches
|
||||
public partial class JokeCommands : NadekoModule<SearchesService>
|
||||
{
|
||||
[Cmd]
|
||||
public async partial Task Yomama()
|
||||
public async Task Yomama()
|
||||
=> await SendConfirmAsync(await _service.GetYomamaJoke());
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Randjoke()
|
||||
public async Task Randjoke()
|
||||
{
|
||||
var (setup, punchline) = await _service.GetRandomJoke();
|
||||
await SendConfirmAsync(setup, punchline);
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task ChuckNorris()
|
||||
public async Task ChuckNorris()
|
||||
=> await SendConfirmAsync(await _service.GetChuckNorrisJoke());
|
||||
|
||||
[Cmd]
|
||||
public async partial Task WowJoke()
|
||||
public async Task WowJoke()
|
||||
{
|
||||
if (!_service.WowJokes.Any())
|
||||
{
|
||||
@@ -37,7 +37,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task MagicItem()
|
||||
public async Task MagicItem()
|
||||
{
|
||||
if (!_service.WowJokes.Any())
|
||||
{
|
||||
|
@@ -28,7 +28,7 @@ public partial class Searches
|
||||
=> _httpFactory = factory;
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Memelist(int page = 1)
|
||||
public async Task Memelist(int page = 1)
|
||||
{
|
||||
if (--page < 0)
|
||||
return;
|
||||
@@ -55,7 +55,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Memegen(string meme, [Leftover] string memeText = null)
|
||||
public async Task Memegen(string meme, [Leftover] string memeText = null)
|
||||
{
|
||||
var memeUrl = $"http://api.memegen.link/{meme}";
|
||||
if (!string.IsNullOrWhiteSpace(memeText))
|
||||
|
@@ -20,7 +20,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Osu(string user, [Leftover] string mode = null)
|
||||
public async Task Osu(string user, [Leftover] string mode = null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(user))
|
||||
return;
|
||||
@@ -76,7 +76,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Gatari(string user, [Leftover] string mode = null)
|
||||
public async Task Gatari(string user, [Leftover] string mode = null)
|
||||
{
|
||||
using var http = _httpFactory.CreateClient();
|
||||
var modeNumber = string.IsNullOrWhiteSpace(mode) ? 0 : ResolveGameMode(mode);
|
||||
@@ -114,7 +114,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Osu5(string user, [Leftover] string mode = null)
|
||||
public async Task Osu5(string user, [Leftover] string mode = null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(_creds.OsuApiKey))
|
||||
{
|
||||
|
@@ -115,7 +115,7 @@ public partial class Searches
|
||||
=> _httpFactory = httpFactory;
|
||||
|
||||
[Cmd]
|
||||
public async partial Task PathOfExile(string usr, string league = "", int page = 1)
|
||||
public async Task PathOfExile(string usr, string league = "", int page = 1)
|
||||
{
|
||||
if (--page < 0)
|
||||
return;
|
||||
@@ -179,7 +179,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task PathOfExileLeagues()
|
||||
public async Task PathOfExileLeagues()
|
||||
{
|
||||
var leagues = new List<Leagues>();
|
||||
|
||||
@@ -220,7 +220,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task PathOfExileCurrency(
|
||||
public async Task PathOfExileCurrency(
|
||||
string leagueName,
|
||||
string currencyName,
|
||||
string convertName = "Chaos Orb")
|
||||
|
@@ -21,11 +21,11 @@ public partial class Searches
|
||||
private static readonly string _typesStr = string.Join(", ", Enum.GetNames(typeof(PlaceType)));
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Placelist()
|
||||
public async Task Placelist()
|
||||
=> await SendConfirmAsync(GetText(strs.list_of_place_tags(prefix)), _typesStr);
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Place(PlaceType placeType, uint width = 0, uint height = 0)
|
||||
public async Task Place(PlaceType placeType, uint width = 0, uint height = 0)
|
||||
{
|
||||
var url = string.Empty;
|
||||
switch (placeType)
|
||||
|
@@ -15,7 +15,7 @@ public partial class Searches
|
||||
=> _cache = cache;
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Pokemon([Leftover] string pokemon = null)
|
||||
public async Task Pokemon([Leftover] string pokemon = null)
|
||||
{
|
||||
pokemon = pokemon?.Trim().ToUpperInvariant();
|
||||
if (string.IsNullOrWhiteSpace(pokemon))
|
||||
@@ -47,7 +47,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task PokemonAbility([Leftover] string ability = null)
|
||||
public async Task PokemonAbility([Leftover] string ability = null)
|
||||
{
|
||||
ability = ability?.Trim().ToUpperInvariant().Replace(" ", "", StringComparison.InvariantCulture);
|
||||
if (string.IsNullOrWhiteSpace(ability))
|
||||
|
@@ -22,7 +22,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Google([Leftover] string? query = null)
|
||||
public async Task Google([Leftover] string? query = null)
|
||||
{
|
||||
query = query?.Trim();
|
||||
|
||||
@@ -76,7 +76,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Image([Leftover] string? query = null)
|
||||
public async Task Image([Leftover] string? query = null)
|
||||
{
|
||||
query = query?.Trim();
|
||||
|
||||
@@ -148,7 +148,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Youtube([Leftover] string? query = null)
|
||||
public async Task Youtube([Leftover] string? query = null)
|
||||
{
|
||||
query = query?.Trim();
|
||||
|
||||
@@ -173,7 +173,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
// [Cmd]
|
||||
// public async partial Task DuckDuckGo([Leftover] string query = null)
|
||||
// public async Task DuckDuckGo([Leftover] string query = null)
|
||||
// {
|
||||
// query = query?.Trim();
|
||||
// if (!await ValidateQuery(query))
|
||||
|
@@ -40,7 +40,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Rip([Leftover] IGuildUser usr)
|
||||
public async Task Rip([Leftover] IGuildUser usr)
|
||||
{
|
||||
var av = usr.RealAvatarUrl();
|
||||
await using var picStream = await _service.GetRipPictureAsync(usr.Nickname ?? usr.Username, av);
|
||||
@@ -50,7 +50,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Weather([Leftover] string query)
|
||||
public async Task Weather([Leftover] string query)
|
||||
{
|
||||
if (!await ValidateQuery(query))
|
||||
return;
|
||||
@@ -98,7 +98,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Time([Leftover] string query)
|
||||
public async Task Time([Leftover] string query)
|
||||
{
|
||||
if (!await ValidateQuery(query))
|
||||
return;
|
||||
@@ -146,7 +146,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Movie([Leftover] string query = null)
|
||||
public async Task Movie([Leftover] string query = null)
|
||||
{
|
||||
if (!await ValidateQuery(query))
|
||||
return;
|
||||
@@ -172,19 +172,19 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public partial Task RandomCat()
|
||||
public Task RandomCat()
|
||||
=> InternalRandomImage(SearchesService.ImageTag.Cats);
|
||||
|
||||
[Cmd]
|
||||
public partial Task RandomDog()
|
||||
public Task RandomDog()
|
||||
=> InternalRandomImage(SearchesService.ImageTag.Dogs);
|
||||
|
||||
[Cmd]
|
||||
public partial Task RandomFood()
|
||||
public Task RandomFood()
|
||||
=> InternalRandomImage(SearchesService.ImageTag.Food);
|
||||
|
||||
[Cmd]
|
||||
public partial Task RandomBird()
|
||||
public Task RandomBird()
|
||||
=> InternalRandomImage(SearchesService.ImageTag.Birds);
|
||||
|
||||
private Task InternalRandomImage(SearchesService.ImageTag tag)
|
||||
@@ -194,7 +194,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Lmgtfy([Leftover] string ffs = null)
|
||||
public async Task Lmgtfy([Leftover] string ffs = null)
|
||||
{
|
||||
if (!await ValidateQuery(ffs))
|
||||
return;
|
||||
@@ -204,7 +204,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Shorten([Leftover] string query)
|
||||
public async Task Shorten([Leftover] string query)
|
||||
{
|
||||
if (!await ValidateQuery(query))
|
||||
return;
|
||||
@@ -247,7 +247,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task MagicTheGathering([Leftover] string search)
|
||||
public async Task MagicTheGathering([Leftover] string search)
|
||||
{
|
||||
if (!await ValidateQuery(search))
|
||||
return;
|
||||
@@ -274,7 +274,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Hearthstone([Leftover] string name)
|
||||
public async Task Hearthstone([Leftover] string name)
|
||||
{
|
||||
if (!await ValidateQuery(name))
|
||||
return;
|
||||
@@ -303,7 +303,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task UrbanDict([Leftover] string query = null)
|
||||
public async Task UrbanDict([Leftover] string query = null)
|
||||
{
|
||||
if (!await ValidateQuery(query))
|
||||
return;
|
||||
@@ -342,7 +342,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Define([Leftover] string word)
|
||||
public async Task Define([Leftover] string word)
|
||||
{
|
||||
if (!await ValidateQuery(word))
|
||||
return;
|
||||
@@ -413,7 +413,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Catfact()
|
||||
public async Task Catfact()
|
||||
{
|
||||
using var http = _httpFactory.CreateClient();
|
||||
var response = await http.GetStringAsync("https://catfact.ninja/fact");
|
||||
@@ -425,7 +425,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
//done in 3.0
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async partial Task Revav([Leftover] IGuildUser usr = null)
|
||||
public async Task Revav([Leftover] IGuildUser usr = null)
|
||||
{
|
||||
if (usr is null)
|
||||
usr = (IGuildUser)ctx.User;
|
||||
@@ -436,7 +436,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
|
||||
//done in 3.0
|
||||
[Cmd]
|
||||
public async partial Task Revimg([Leftover] string imageLink = null)
|
||||
public async Task Revimg([Leftover] string imageLink = null)
|
||||
{
|
||||
imageLink = imageLink?.Trim() ?? "";
|
||||
|
||||
@@ -447,7 +447,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Wiki([Leftover] string query = null)
|
||||
public async Task Wiki([Leftover] string query = null)
|
||||
{
|
||||
query = query?.Trim();
|
||||
|
||||
@@ -466,7 +466,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Color(params Color[] colors)
|
||||
public async Task Color(params Color[] colors)
|
||||
{
|
||||
if (!colors.Any())
|
||||
return;
|
||||
@@ -486,7 +486,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async partial Task Avatar([Leftover] IGuildUser usr = null)
|
||||
public async Task Avatar([Leftover] IGuildUser usr = null)
|
||||
{
|
||||
if (usr is null)
|
||||
usr = (IGuildUser)ctx.User;
|
||||
@@ -503,7 +503,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Wikia(string target, [Leftover] string query)
|
||||
public async Task Wikia(string target, [Leftover] string query)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(target) || string.IsNullOrWhiteSpace(query))
|
||||
{
|
||||
@@ -544,7 +544,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async partial Task Bible(string book, string chapterAndVerse)
|
||||
public async Task Bible(string book, string chapterAndVerse)
|
||||
{
|
||||
var obj = new BibleVerses();
|
||||
try
|
||||
@@ -571,7 +571,7 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Steam([Leftover] string query)
|
||||
public async Task Steam([Leftover] string query)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(query))
|
||||
return;
|
||||
|
@@ -105,18 +105,14 @@ public class SearchesService : INService
|
||||
}
|
||||
|
||||
bg.Mutate(x => x.DrawText(
|
||||
new()
|
||||
new TextOptions(_fonts.RipFont)
|
||||
{
|
||||
TextOptions = new TextOptions
|
||||
{
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
WrapTextWidth = 190
|
||||
}.WithFallbackFonts(_fonts.FallBackFonts)
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
FallbackFontFamilies = _fonts.FallBackFonts,
|
||||
Origin = new(bg.Width / 2, 225),
|
||||
},
|
||||
text,
|
||||
_fonts.RipFont,
|
||||
Color.Black,
|
||||
new(25, 225)));
|
||||
Color.Black));
|
||||
|
||||
//flowa
|
||||
using (var flowers = Image.Load(await _imgs.GetRipOverlayAsync()))
|
||||
|
@@ -19,7 +19,7 @@ public partial class Searches
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.ManageMessages)]
|
||||
public async partial Task StreamAdd(string link)
|
||||
public async Task StreamAdd(string link)
|
||||
{
|
||||
var data = await _service.FollowStream(ctx.Guild.Id, ctx.Channel.Id, link);
|
||||
if (data is null)
|
||||
@@ -36,7 +36,7 @@ public partial class Searches
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.ManageMessages)]
|
||||
[Priority(1)]
|
||||
public async partial Task StreamRemove(int index)
|
||||
public async Task StreamRemove(int index)
|
||||
{
|
||||
if (--index < 0)
|
||||
return;
|
||||
@@ -54,7 +54,7 @@ public partial class Searches
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.Administrator)]
|
||||
public async partial Task StreamsClear()
|
||||
public async Task StreamsClear()
|
||||
{
|
||||
await _service.ClearAllStreams(ctx.Guild.Id);
|
||||
await ReplyConfirmLocalizedAsync(strs.streams_cleared);
|
||||
@@ -62,7 +62,7 @@ public partial class Searches
|
||||
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async partial Task StreamList(int page = 1)
|
||||
public async Task StreamList(int page = 1)
|
||||
{
|
||||
if (page-- < 1)
|
||||
return;
|
||||
@@ -113,7 +113,7 @@ public partial class Searches
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.ManageMessages)]
|
||||
public async partial Task StreamOffline()
|
||||
public async Task StreamOffline()
|
||||
{
|
||||
var newValue = _service.ToggleStreamOffline(ctx.Guild.Id);
|
||||
if (newValue)
|
||||
@@ -125,7 +125,7 @@ public partial class Searches
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.ManageMessages)]
|
||||
public async partial Task StreamOnlineDelete()
|
||||
public async Task StreamOnlineDelete()
|
||||
{
|
||||
var newValue = _service.ToggleStreamOnlineDelete(ctx.Guild.Id);
|
||||
if (newValue)
|
||||
@@ -137,7 +137,7 @@ public partial class Searches
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.ManageMessages)]
|
||||
public async partial Task StreamMessage(int index, [Leftover] string message)
|
||||
public async Task StreamMessage(int index, [Leftover] string message)
|
||||
{
|
||||
if (--index < 0)
|
||||
return;
|
||||
@@ -157,7 +157,7 @@ public partial class Searches
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.ManageMessages)]
|
||||
public async partial Task StreamMessageAll([Leftover] string message)
|
||||
public async Task StreamMessageAll([Leftover] string message)
|
||||
{
|
||||
var count = _service.SetStreamMessageForAll(ctx.Guild.Id, message);
|
||||
|
||||
@@ -172,7 +172,7 @@ public partial class Searches
|
||||
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async partial Task StreamCheck(string url)
|
||||
public async Task StreamCheck(string url)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@@ -13,7 +13,7 @@ public partial class Searches
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task Translate(string from, string to, [Leftover] string text = null)
|
||||
public async Task Translate(string from, string to, [Leftover] string text = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -35,7 +35,7 @@ public partial class Searches
|
||||
[UserPerm(GuildPerm.Administrator)]
|
||||
[BotPerm(ChannelPerm.ManageMessages)]
|
||||
[OwnerOnly]
|
||||
public async partial Task AutoTranslate(AutoDeleteAutoTranslate autoDelete = AutoDeleteAutoTranslate.Nodel)
|
||||
public async Task AutoTranslate(AutoDeleteAutoTranslate autoDelete = AutoDeleteAutoTranslate.Nodel)
|
||||
{
|
||||
var toggle =
|
||||
await _service.ToggleAtl(ctx.Guild.Id, ctx.Channel.Id, autoDelete == AutoDeleteAutoTranslate.Del);
|
||||
@@ -47,7 +47,7 @@ public partial class Searches
|
||||
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async partial Task AutoTransLang()
|
||||
public async Task AutoTransLang()
|
||||
{
|
||||
if (await _service.UnregisterUser(ctx.Channel.Id, ctx.User.Id))
|
||||
await ReplyConfirmLocalizedAsync(strs.atl_removed);
|
||||
@@ -55,7 +55,7 @@ public partial class Searches
|
||||
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async partial Task AutoTransLang(string from, string to)
|
||||
public async Task AutoTransLang(string from, string to)
|
||||
{
|
||||
var succ = await _service.RegisterUserAsync(ctx.User.Id, ctx.Channel.Id, from.ToLower(), to.ToLower());
|
||||
|
||||
@@ -76,7 +76,7 @@ public partial class Searches
|
||||
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async partial Task Translangs()
|
||||
public async Task Translangs()
|
||||
=> await ctx.Channel.SendTableAsync(_service.GetLanguages(), str => $"{str,-15}");
|
||||
}
|
||||
}
|
@@ -16,7 +16,7 @@ public partial class Searches
|
||||
|
||||
[Cmd]
|
||||
[Priority(0)]
|
||||
public async partial Task Xkcd(string arg = null)
|
||||
public async Task Xkcd(string arg = null)
|
||||
{
|
||||
if (arg?.ToLowerInvariant().Trim() == "latest")
|
||||
{
|
||||
@@ -50,7 +50,7 @@ public partial class Searches
|
||||
|
||||
[Cmd]
|
||||
[Priority(1)]
|
||||
public async partial Task Xkcd(int num)
|
||||
public async Task Xkcd(int num)
|
||||
{
|
||||
if (num < 1)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user