2022-11-20 18:56:57 +01:00
|
|
|
package wtf.beatrice.hidekobot.commands.slash;
|
2022-11-20 06:04:00 +01:00
|
|
|
|
|
|
|
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import wtf.beatrice.hidekobot.utils.RandomUtil;
|
|
|
|
|
|
|
|
public class CoinFlipCommand
|
|
|
|
{
|
|
|
|
|
|
|
|
public CoinFlipCommand(@NotNull SlashCommandInteractionEvent event)
|
|
|
|
{
|
|
|
|
int rand = RandomUtil.getRandomNumber(0, 1);
|
|
|
|
String msg;
|
|
|
|
|
|
|
|
if(rand == 1)
|
|
|
|
{
|
|
|
|
msg = ":coin: It's **Heads**!";
|
|
|
|
} else {
|
|
|
|
msg = "It's **Tails**! :coin:";
|
|
|
|
}
|
|
|
|
|
|
|
|
event.reply(msg).queue();
|
|
|
|
}
|
|
|
|
}
|