KEKSE
This commit is contained in:
parent
fa9f1bd4fb
commit
407e613ce5
31
src/inc/trigger/cookie.mjs
Normal file
31
src/inc/trigger/cookie.mjs
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
import sql from "../sql";
|
||||||
|
|
||||||
|
const data = {
|
||||||
|
cookie_cookies: [],
|
||||||
|
cookie_sizes: [],
|
||||||
|
cookie_flavors: [],
|
||||||
|
cookie_methods: [],
|
||||||
|
cookie_beverages: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
Object.keys(data).forEach(cur => {
|
||||||
|
sql.any("select data from useless where trigger = $1 limit 1", [cur])
|
||||||
|
.then(rows => {
|
||||||
|
data[cur] = JSON.parse(rows[0].data);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
export default bot => {
|
||||||
|
bot._trigger.set("cookie", new bot.trigger({
|
||||||
|
call: /^(\.|\/)cookie/i,
|
||||||
|
f: e => {
|
||||||
|
const sayMethod = data.cookie_methods[~~(Math.random() * data.cookie_methods.length)];
|
||||||
|
const sayFlavor = data.cookie_flavors[~~(Math.random() * data.cookie_flavors.length)];
|
||||||
|
const saySize = data.cookie_sizes[~~(Math.random() * data.cookie_sizes.length)];
|
||||||
|
const sayCookie = data.cookie_cookies[~~(Math.random() * data.cookie_cookies.length)];
|
||||||
|
const sayBev = data.cookie_beverages[~~(Math.random() * data.cookie_beverages.length)];
|
||||||
|
|
||||||
|
e.reply(`Here, I'll ${sayMethod} you a ${sayFlavor} ${saySize} ${sayCookie} cookie with a side of ${sayBev}.`);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
};
|
|
@ -1,5 +1,6 @@
|
||||||
import cfg from "./cfg";
|
import cfg from "./cfg";
|
||||||
import coins from "./coins";
|
import coins from "./coins";
|
||||||
|
import cookie from "./cookie";
|
||||||
import core from "./core";
|
import core from "./core";
|
||||||
import debug from "./debug";
|
import debug from "./debug";
|
||||||
import drugs from "./drugs";
|
import drugs from "./drugs";
|
||||||
|
@ -15,7 +16,7 @@ import uwe from "./useless_uwe";
|
||||||
import wttr from "./wttr";
|
import wttr from "./wttr";
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
cfg, coins, core, debug,
|
cfg, coins, cookie, core, debug,
|
||||||
drugs, kernel, mcmaniac,
|
drugs, kernel, mcmaniac,
|
||||||
parser, quotes, rape, sandbox,
|
parser, quotes, rape, sandbox,
|
||||||
urban, nxy, uwe, wttr
|
urban, nxy, uwe, wttr
|
||||||
|
|
Loading…
Reference in New Issue
Block a user