From 285650befeb6d7e33b8514136d136b27d41ad667 Mon Sep 17 00:00:00 2001 From: Lukian LEIZOUR Date: Tue, 31 Jan 2023 13:51:06 +0100 Subject: [PATCH] commit --- app.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app.js b/app.js index 5cc873c..1d2fc1a 100644 --- a/app.js +++ b/app.js @@ -122,7 +122,13 @@ client.on('ready', () => { }); client.on('messageCreate', async msg => { - if (msg.content.startsWith('/q')) { + if (msg.content.startsWith('/github')) { + console.log('[Discord] Sent github link') + addToLogs('[Discord] Sent github link') + msg.reply('Link of the Gihhub repository :\n -https://github.com/Ninja-Jambon/chaise_bot') + } + + else if (msg.content.startsWith('/q')) { answerQuestion(msg.content.slice(+3)).then((res) => { console.log('[Discord] Sent answer to : ' + msg.content.slice(+3)); addToLogs('[Discord] Sent answer to : ' + msg.content.slice(+3)); @@ -138,7 +144,7 @@ client.on('messageCreate', async msg => { msg.reply('Generating the answer...'); } - if (msg.content.startsWith('/g')) { + else if (msg.content.startsWith('/g')) { generateImage(msg.content.slice(+3)).then((res) => { console.log('[Discord] Sent image to : ' + msg.content.slice(+3)); addToLogs('[Discord] Sent image to : ' + msg.content.slice(+3)); @@ -153,12 +159,6 @@ client.on('messageCreate', async msg => { addToLogs('[Discord] Generating image to : ' + msg.content.slice(+3)); msg.reply('Generating the image...'); } - - else if (msg.content.startsWith('/github')) { - console.log('[Discord] Sent github link') - addToLogs('[Discord] Sent github link') - msg.reply('Link of the Gihhub repository :\n -https://github.com/Ninja-Jambon/chaise_bot') - } }); //bot launch