This commit is contained in:
Lukian LEIZOUR 2022-11-27 20:47:21 +01:00
parent 9032a0c9ac
commit 4087e18757

15
app.js
View file

@ -1,9 +1,10 @@
//Importing libs
const { Telegraf } = require('telegraf'); const { Telegraf } = require('telegraf');
const fs = require('fs');
const https = require('https'); //Importing other files
const { getJoke } = require('./dadJokes'); const { getJoke } = require('./libs/dadJokes');
const r34 = require('./rule34'); const { rtag, r34 } = require('./libs/rule34');
const { addToLogs, isTrue, image_search } = require('./botTools'); const { addToLogs, isTrue, image_search } = require('./libs/botTools');
//bot initialization //bot initialization
const bot = new Telegraf(process.env.TELEGRAM); const bot = new Telegraf(process.env.TELEGRAM);
@ -53,11 +54,11 @@ bot.command('suggest', ctx => {
}) })
bot.command('rtag', 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 => { 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 => { bot.command('dadjoke', ctx => {