commit
This commit is contained in:
parent
c96c7142d3
commit
285650befe
1 changed files with 8 additions and 8 deletions
16
app.js
16
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue