From 4087e187577123d6c51c4f66e639b868c8c9c1cc Mon Sep 17 00:00:00 2001 From: Lukian LEIZOUR Date: Sun, 27 Nov 2022 20:47:21 +0100 Subject: [PATCH] commit --- app.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app.js b/app.js index 516efde..1765bbb 100644 --- a/app.js +++ b/app.js @@ -1,9 +1,10 @@ +//Importing libs const { Telegraf } = require('telegraf'); -const fs = require('fs'); -const https = require('https'); -const { getJoke } = require('./dadJokes'); -const r34 = require('./rule34'); -const { addToLogs, isTrue, image_search } = require('./botTools'); + +//Importing other files +const { getJoke } = require('./libs/dadJokes'); +const { rtag, r34 } = require('./libs/rule34'); +const { addToLogs, isTrue, image_search } = require('./libs/botTools'); //bot initialization const bot = new Telegraf(process.env.TELEGRAM); @@ -53,11 +54,11 @@ bot.command('suggest', ctx => { }) bot.command('rtag', ctx => { - r34.rtag(ctx.message.text.slice(+6), ctx, bot) + rtag(ctx.message.text.slice(+6), ctx, bot) }) bot.command('r34', ctx => { - r34.r34(ctx.message.text.slice(+5), ctx, bot) + r34(ctx.message.text.slice(+5), ctx, bot) }) bot.command('dadjoke', ctx => {