Exemple #1
0
        public async Task AGE(IGuildUser user = null)
        {
            string age = "";

            if (user == null)
            {
                age = "Dein Account wurde am " + Context.User.CreatedAt.ToString() + " erstellt.";
            }
            else
            {
                age = "Der Account von " + user.Username + " wurde am " + user.CreatedAt.ToString() + " erstellt.";
            }

            await ReplyAsync(embed : await EmbedHandler.CreateBasicEmbed("Age", age, Color.Green));
        }
Exemple #2
0
        public async Task Help()
        {
            printString = "";
            bool IsTargetOnServer = Context.Guild.Users.Any(x => x.Username.Equals(TargetName));

            printString += "Hier sind meine Befehle: ";
            foreach (string str in befehle)
            {
                printString += "\n-" + str;
            }

            if (IsTargetOnServer)
            {
                printString += "\n-madi";
            }

            await ReplyAsync(embed : await EmbedHandler.CreateBasicEmbed("Help",
                                                                         printString,
                                                                         Color.Green));
        }
Exemple #3
0
        public async Task MeMe(long index = 0)
        {
            DirectoryInfo d = new DirectoryInfo(Environment.CurrentDirectory + @"\memes"); //Assuming Test is your Folder

            FileInfo[] Files = d.GetFiles();                                               //Getting Text files

            if (index > Files.Count())
            {
                await ReplyAsync(embed : await EmbedHandler.CreateErrorEmbed("MEME Command",
                                                                             "Number exceeds the number of memes available"));
            }
            else if (index > 0)
            {
                for (int i = 0; i < index; i++)
                {
                    await Context.Channel.SendFileAsync(Files[rand.Next(0, Files.Count())].ToString());
                }
            }
            else
            {
                await Context.Channel.SendFileAsync(Files[rand.Next(0, Files.Count())].ToString());
            }
        }