error reporting
This commit is contained in:
parent
0c34607283
commit
7f0f633aa9
@ -15,7 +15,10 @@ module.exports = {
|
|||||||
const client = message.client;
|
const client = message.client;
|
||||||
if (!client.gifs.has(file.name)) {
|
if (!client.gifs.has(file.name)) {
|
||||||
tenor.Search.Query(file.name, 1).then(res => {
|
tenor.Search.Query(file.name, 1).then(res => {
|
||||||
if (res[0] == undefined) return;
|
if (res[0] == undefined) {
|
||||||
|
message.reply('Sorry I was unable to find a GIF of ' + file.name);
|
||||||
|
return;
|
||||||
|
};
|
||||||
const gifInfo = {
|
const gifInfo = {
|
||||||
'name': file.name,
|
'name': file.name,
|
||||||
'embed_url': res[0].media[0].gif.url
|
'embed_url': res[0].media[0].gif.url
|
||||||
|
Loading…
Reference in New Issue
Block a user