-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add game category which includes... - `/8ball` - funny ball lol - `/bet` - bet your virtual money - `/coin-flip` - flip a coin for some reason"
- Loading branch information
Showing
5 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Discord, Slash, SlashOption } from "discordx"; | ||
import { ApplicationCommandOptionType, Colors, CommandInteraction, EmbedBuilder } from "discord.js"; | ||
import { Category } from "@discordx/utilities"; | ||
|
||
@Discord() | ||
@Category("Game") | ||
export class Magic8Ball { | ||
@Slash({ description: "Ask a question to the magic 8 ball", name: "8ball" }) | ||
async magic8ball( | ||
@SlashOption({ | ||
description: "Question to ask", | ||
name: "question", | ||
type: ApplicationCommandOptionType.String, | ||
required: true, | ||
}) | ||
question: string, | ||
interaction: CommandInteraction, | ||
): Promise<void> { | ||
const answers = [ | ||
"Signs point to yes.", | ||
"Yes.", | ||
"Reply hazy, try again.", | ||
"Without a doubt.", | ||
"My sources say no.", | ||
"As I see it, yes.", | ||
"You may rely on it.", | ||
"Concentrate and ask again.", | ||
"Outlook not so good.", | ||
"It is decidedly so.", | ||
"Better not tell you now.", | ||
]; | ||
|
||
await interaction.reply({ | ||
embeds: [ | ||
new EmbedBuilder() | ||
.setTitle("Magic 8 Ball") | ||
.setDescription(`**Question:** ${question}\n**Answer:** ${answers[Math.floor(Math.random() * answers.length)]}`) | ||
.setColor(Colors.Blue), | ||
], | ||
}); | ||
} | ||
} |
Empty file.
Empty file.
Empty file.
Empty file.