package net.romvoid.crashbot.commands; import java.awt.*; import java.util.concurrent.TimeUnit; import com.jagrosh.jdautilities.command.Command; import com.jagrosh.jdautilities.command.CommandEvent; import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.entities.Message; import net.dv8tion.jda.api.entities.MessageChannel; import net.romvoid.crashbot.Bot; import net.romvoid.crashbot.utilities.EmbedUtil; public class Kot666Command extends Command { public Kot666Command() { this.name = "kot666"; this.help = "kot666"; this.botPermissions = new Permission[]{Permission.MESSAGE_EMBED_LINKS}; this.guildOnly = false; } @Override protected void execute(CommandEvent event) { Bot.LOG.info(event.getAuthor().getName() + " invoked command " + this.name); MessageChannel channel = event.getChannel(); EmbedBuilder embed = EmbedUtil.embed(" ",""); embed.setColor(new Color(41, 128, 185)).setImage("https://mfnd.ru/?mode=file&uniq=mdpQAixZSyPe"); Message msg = EmbedUtil.message(embed); EmbedUtil.sendAndDeleteOnGuilds(channel, msg, -1, TimeUnit.MINUTES); event.getMessage().delete().queue(); } }