send DMs for savegif, reduce spam
This commit is contained in:
parent
1113541fdb
commit
7b95f4b0ab
@ -13,8 +13,8 @@ module.exports = {
|
|||||||
description: 'Adds a given gif to the hardcoded list.',
|
description: 'Adds a given gif to the hardcoded list.',
|
||||||
usage: '<search query>',
|
usage: '<search query>',
|
||||||
execute(message, file) {
|
execute(message, file) {
|
||||||
const channel = message.channel;
|
|
||||||
const query = file.name;
|
const query = file.name;
|
||||||
|
message.author.createDM().then(channel => {
|
||||||
tenor.Search.Query(query, 20)
|
tenor.Search.Query(query, 20)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res[0] == undefined) {
|
if (res[0] == undefined) {
|
||||||
@ -92,5 +92,6 @@ module.exports = {
|
|||||||
}).catch(err => console.error(err));
|
}).catch(err => console.error(err));
|
||||||
})
|
})
|
||||||
.catch(err => console.error(err));
|
.catch(err => console.error(err));
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user