Esempio n. 1
0
        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}");
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public async Task Force(int index) => await ProcessMeme(Looter.ForceMeme(index));
Esempio n. 4
0
 public async Task GetURL(int index)
 {
     await ReplyAsync($"[{Looter.ForceMeme(index).Meme.URL}]");
 }