Fixed gifs, refactor later, this is horrible
This commit is contained in:
parent
640ac92c50
commit
8a39005c32
2 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
const { SlashCommandBuilder } = require('discord.js');
|
||||
const help = require('../helpFunctions.js');
|
||||
const gifEmbed = require('../gifs.js');
|
||||
const gifAmount = 50;
|
||||
require('dotenv').config();
|
||||
|
||||
|
@ -21,14 +21,14 @@ async function getGifEmbed(options) {
|
|||
}
|
||||
catch {
|
||||
const gifs = `https://g.tenor.com/v1/random?key=${process.env.TENOR}&limit=${gifAmount}&contentfilter=${rating}`;
|
||||
return help.getGifEmbed(gifs, gifAmount);
|
||||
return gifEmbed.getGifEmbed(gifs, gifAmount);
|
||||
}
|
||||
|
||||
const searchSplits = search.split(/[ ]+/);
|
||||
const searchKey = searchSplits.join('-');
|
||||
|
||||
const gifs = `https://g.tenor.com/v1/search?q=${searchKey}&key=${process.env.TENOR}&limit=${gifAmount}&contentfilter=${rating}`;
|
||||
return help.getGifEmbed(gifs, gifAmount);
|
||||
return gifEmbed.getGifEmbed(gifs, gifAmount);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
2
main.js
2
main.js
|
@ -96,6 +96,6 @@ client.on('interactionCreate', async interaction => {
|
|||
}
|
||||
});
|
||||
|
||||
client.login(process.env.TOKEN);
|
||||
client.login(process.env.DEBUGTOKEN);
|
||||
|
||||
module.exports = client;
|
Loading…
Reference in a new issue