2021-03-30 23:14:15 +00:00
|
|
|
import {User} from "discord.js";
|
2020-12-15 01:44:28 +00:00
|
|
|
import Command from "../../core/command";
|
2021-03-30 23:14:15 +00:00
|
|
|
import {random} from "../../core/lib";
|
2021-03-31 02:19:04 +00:00
|
|
|
import {parseVars} from "../../core/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 Command({
|
|
|
|
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 Command({
|
|
|
|
async run($) {
|
|
|
|
$.channel.send(`${$.author} gave everybody a cookie!`);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
2020-12-15 01:44:28 +00:00
|
|
|
user: new Command({
|
|
|
|
description: "User to give cookie to.",
|
2021-03-30 10:25:07 +00:00
|
|
|
async run($) {
|
2020-12-15 01:44:28 +00:00
|
|
|
const sender = $.author;
|
2021-03-30 23:14:15 +00:00
|
|
|
const mention: User = $.args[0];
|
2020-12-15 01:44:28 +00:00
|
|
|
|
2021-03-30 10:25:07 +00:00
|
|
|
if (mention.id == sender.id) {
|
|
|
|
$.channel.send("You can't give yourself cookies!");
|
|
|
|
return;
|
|
|
|
}
|
2020-12-15 01:44:28 +00:00
|
|
|
|
2021-03-30 23:14:15 +00:00
|
|
|
$.channel.send(
|
|
|
|
`:cookie: <@${sender.id}> ${parseVars(random(cookies), {
|
|
|
|
target: mention.toString()
|
|
|
|
})}`
|
|
|
|
);
|
2020-12-15 01:44:28 +00:00
|
|
|
}
|
|
|
|
})
|
|
|
|
});
|