Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions bingus-bot/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,29 @@ const contexts = [replyContext, replyListContext];

const rest = new REST({ version: "10" }).setToken(auth.token);

const magic8BallAnswers: string[] = [
"It is certain",
"It is decidedly so",
"Without a doubt",
"Yes definitely",
"You may rely on it",
"As I see it, yes",
"Most likely",
"Outlook good",
"Yes",
"Signs point to yes",
"Reply hazy, try again",
"Ask again later",
"Better not tell you now",
"Cannot predict now",
"Concentrate and ask again",
"Don't count on it",
"My reply is no",
"My sources say no",
"Outlook not so good",
"Very doubtful"
];

try {
console.log("Started refreshing application (/) commands.");

Expand Down Expand Up @@ -182,6 +205,13 @@ client.on("messageCreate", async (msg) => {
return await msg.react(BINGUS_EMOJI);
}

// Response to asking if this is real
if (msg.mentions.users.has(clientId) && lowercase.includes("is this real")) {
const i = Math.floor(Math.random() * magic8BallAnswers.length)

return await msg.reply(magic8BallAnswers[i])
}

if (
msg.mentions.users.has(clientId) ||
/\b(bot|bing\w{0,4})\b/.test(lowercase)
Expand Down
Loading