This commit is contained in:
Lukian LEIZOUR 2022-12-05 22:54:16 +01:00
parent ba0ebec07d
commit a5a86747ad
3 changed files with 32 additions and 3 deletions

6
app.js
View file

@ -7,7 +7,7 @@ const { getJoke } = require('./libs/dadJokes');
const { rtag, r34 } = require('./libs/rule34');
const { addToLogs, isTrue, image_search, getHelp } = require('./libs/botTools');
const { rockPaperScissorsAgainstBot } = require('./libs/games');
const { generateImage } = require('./libs/openAi');
const { generateImage, answerQuestion } = require('./libs/openAi');
//bot initialization
const bot = new Telegraf(process.env.TELEGRAM);
@ -88,5 +88,9 @@ bot.command('g', ctx => {
generateImage(ctx.message.text.slice(+3), ctx, bot)
})
bot.command('q', ctx => {
answerQuestion(ctx.message.text.slice(+3), ctx, bot)
})
//bot launch
bot.launch();