diff --git a/config.json b/config.json index dc0cec2..4bcfb5d 100644 --- a/config.json +++ b/config.json @@ -1,7 +1,7 @@ { "prefix": "/", "serverID": "760701839427108874", - "logChannel": "858449941911437353", + "logChannel": "859249300894908447", "bootMessage": "NodBot v2 Starting Up", "shutdownMessage": "NodBot v2 Shutting Down" } \ No newline at end of file diff --git a/index.js b/index.js index 2075af9..2ccc98b 100644 --- a/index.js +++ b/index.js @@ -67,14 +67,14 @@ client.on('message', message => { if (!client.gifs.has(file[0])) { giphy.search(query, (err, res) => { if (res.data[0] != undefined) { - message.channel.send(res.data[0].embed_url).then().catch(console.error); + message.channel.send(query + ' requested by ' + message.author.username + '\n' + res.data[0].embed_url).then().catch(console.error); } else { message.channel.send('I was unable to find a gif of ' + query); } if (err) console.error(err); }); } else { - message.channel.send(client.gifs.get(query).embed_url); + message.channel.send(query + ' requested by ' + message.author.username + '\n' + client.gifs.get(query).embed_url); } break; case 'pasta': @@ -92,5 +92,8 @@ client.on('message', message => { } } - + // Try to delete the requester's message + if (message.deletable) { + message.delete().then().catch(err => console.error(err)); + } }); \ No newline at end of file