public async Task FindIndex(string URL) { int index = Looter.IndexOf(URL); IndexedMeme m = Looter.ForceMeme(index); await ReplyAsync((index == -1)? "nichts gefunden" : $"{index}: {m.Meme}"); }
public async Task CreateMeme(int index, string upper, string lower) { IndexedMeme m = Looter.ForceMeme(index); string path = Path.Combine(Directory.GetCurrentDirectory(), "Memes"); MemeCreatorManager mcm = new MemeCreatorManager(path, null); var res = mcm.CreateMeme(m.Meme, upper, lower); await Context.Channel.SendFileAsync(res.path, $"{Context.User.Username} is Schuld"); if (Context.Guild != null) { await Context.Channel.DeleteMessagesAsync(new[] { Context.Message.Id }); } Array.ForEach(Directory.GetFiles(path), File.Delete); }
public async Task Force(int index) => await ProcessMeme(Looter.ForceMeme(index));
public async Task GetURL(int index) { await ReplyAsync($"[{Looter.ForceMeme(index).Meme.URL}]"); }