TravBot-v3/src/commands/fun/cookie.ts

56 lines
2.5 KiB
TypeScript
Raw Normal View History

2021-03-30 23:14:15 +00:00
import {User} from "discord.js";
import {Command, NamedCommand} from "../../core";
import {random, parseVars} from "../../lib";
2021-03-30 23:14:15 +00:00
const cookies = [
`has given %target% a chocolate chip cookie!`,
`has given %target% a soft homemade oatmeal cookie!`,
`has given %target% a plain, dry, old cookie. It was the last one in the bag. Gross.`,
`gives %target% a sugar cookie. What, no frosting and sprinkles? 0/10 would not touch.`,
`gives %target% a chocolate chip cookie. Oh wait, those are raisins. Bleck!`,
`gives %target% an enormous cookie. Poking it gives you more cookies. Weird.`,
`gives %target% a fortune cookie. It reads "Why aren't you working on any projects?"`,
`gives %target% a fortune cookie. It reads "Give that special someone a compliment"`,
`gives %target% a fortune cookie. It reads "Take a risk!"`,
`gives %target% a fortune cookie. It reads "Go outside."`,
`gives %target% a fortune cookie. It reads "Don't forget to eat your veggies!"`,
`gives %target% a fortune cookie. It reads "Do you even lift?"`,
`gives %target% a fortune cookie. It reads "m808 pls"`,
`gives %target% a fortune cookie. It reads "If you move your hips, you'll get all the ladies."`,
`gives %target% a fortune cookie. It reads "I love you."`,
`gives %target% a Golden Cookie. You can't eat it because it is made of gold. Dammit.`,
`gives %target% an Oreo cookie with a glass of milk!`,
`gives %target% a rainbow cookie made with love :heart:`,
`gives %target% an old cookie that was left out in the rain, it's moldy.`,
`bakes %target% fresh cookies, it smells amazing.`
];
2020-12-15 01:44:28 +00:00
export default new NamedCommand({
2020-12-15 01:44:28 +00:00
description: "Gives specified user a cookie.",
usage: "['all'/@user]",
run: ":cookie: Here's a cookie!",
2021-03-30 23:14:15 +00:00
subcommands: {
all: new NamedCommand({
2021-04-10 13:34:55 +00:00
async run({send, message, channel, guild, author, member, client, args}) {
send(`${author} gave everybody a cookie!`);
2021-03-30 23:14:15 +00:00
}
})
},
id: "user",
2020-12-15 01:44:28 +00:00
user: new Command({
description: "User to give cookie to.",
2021-04-10 13:34:55 +00:00
async run({send, message, channel, guild, author, member, client, args}) {
const sender = author;
const mention: User = args[0];
2020-12-15 01:44:28 +00:00
2021-04-10 13:34:55 +00:00
if (mention.id == sender.id) return send("You can't give yourself cookies!");
2020-12-15 01:44:28 +00:00
2021-04-10 13:34:55 +00:00
return send(
2021-03-30 23:14:15 +00:00
`:cookie: <@${sender.id}> ${parseVars(random(cookies), {
target: mention.toString()
})}`
);
2020-12-15 01:44:28 +00:00
}
})
});