destory

commands.CreateCommand("destroy") .Parameter("amount", ParameterType.Unparsed) .Do(async (e) => { var mod = e.Server.GetRole(290268153810911242); var modrole = e.Server.FindRoles(mod.Name).FirstOrDefault(); if (e.User.HasRole(modrole)) { string a = e.GetArg("amount"); int amount = Int32.Parse(a); int amount2 = amount + 1; Discord.Message[] mtd; mtd = await e.Channel.DownloadMessages(amount2); await e.Channel.DeleteMessages(mtd); await e.Channel.SendMessage("`Deleted, " + amount + " messages.`"); System.Threading.Thread.Sleep(2000); Discord.Message[] mtd2; mtd2 = await e.Channel.DownloadMessages(1); await e.Channel.DeleteMessages(mtd2); } else { //await e.Channel.SendMessage("You cannot use this command."); } });

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.