1
1
mirror of https://gitlab.com/ceda_ei/Quadnite-Bot synced 2026-05-06 05:40:04 +02:00

Add /suggest to upload gifs to ugoki api server

This commit is contained in:
2021-09-27 21:36:21 +05:30
parent 4878274656
commit 159ca9e87d
7 changed files with 414 additions and 38 deletions

View File

@@ -9,8 +9,9 @@ const media_wiki = require("./media_wiki");
const info = require("./info");
const expand = require("./expand");
const roleplay = require("./roleplay");
const suggest = require("./suggest");
module.exports = (bot, [ questions, kys, insults, commands_list, words, roleplay_data ], feedback_id, axios) => {
module.exports = (bot, [ questions, kys, insults, commands_list, words, roleplay_data ], feedback_id, apiToken, ugokiRoot, axios) => {
bot.command("question", (ctx) => ctx.reply(random(questions)()));
bot.command("word", (ctx) => ctx.reply(random(words)()));
@@ -70,4 +71,6 @@ module.exports = (bot, [ questions, kys, insults, commands_list, words, roleplay
Object.keys(roleplay_data).map(command =>
bot.command(command, ctx => roleplay(roleplay_data[command].forms, roleplay_data[command].gifs)(ctx)));
bot.command("suggest", (ctx) => suggest(axios, apiToken, ugokiRoot)(ctx));
};