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

Use ugoki server instead of hard coded gifs

This commit is contained in:
2021-09-27 22:10:34 +05:30
parent 159ca9e87d
commit 7527fb6a1a
3 changed files with 11 additions and 696 deletions

View File

@@ -67,9 +67,16 @@ module.exports = (bot, [ questions, kys, insults, commands_list, words, roleplay
+ "chatting with me in private, you are most likely doing it wrong. "
+ "Add me to a group for fun. To give feedback, use /feedback"));
const getGetGif = (command) => () => axios.get(
`category/${command}/gif`,
{
baseURL: ugokiRoot
}
);
// Add all roleplay commands
Object.keys(roleplay_data).map(command =>
bot.command(command, ctx => roleplay(roleplay_data[command].forms, roleplay_data[command].gifs)(ctx)));
bot.command(command, ctx => roleplay(roleplay_data[command].forms, getGetGif(command))(ctx)));
bot.command("suggest", (ctx) => suggest(axios, apiToken, ugokiRoot)(ctx));