Testing GIPHY for GIFs

This commit is contained in:
Skylar Grant 2026-09-21 20:08:57 -04:00
parent 5d5db3be40
commit 7ed4318863
7 changed files with 13 additions and 8 deletions

View File

@ -1,3 +1,7 @@
## v3.6.x
#### v3.6.0 (#31) Fixing GIF APIs
* Switch from Tenor to Giphy for GIFs
## v3.5.x
#### v3.5.0 (#30) The April Fools Update
* Add April Fools stuff

View File

@ -84,7 +84,7 @@ dbPort=<mySQL port (3306)>
dbUser=<mySQL username>
dbPass=<mySQL user password>
dbName=<mySQL table name>
tenorAPIKey=<Tenor API Key>
giphyAPIKey=<Tenor API Key>
ownerId=<your Discord user ID>
statusChannelId=<Discord channel ID of channel used for status messages>
clientId=<Discord user ID of your bot>

View File

@ -15,11 +15,12 @@ module.exports = {
// if (message.deletable) message.delete();
const client = message.client;
if (!client.gifs.has(commandData.args.toLowerCase())) {
if (process.env.isDev) console.log('https://tenor.googleapis.com/v2/search?' + `&q=${commandData.args}` + `&key=${process.env.tenorAPIKey}` + '&limit=1&contentfilter=off');
// TODO: Implement proper logging
if (process.env.isDev) console.log('https://api.giphy.com/v2/search?' + `&q=${commandData.args}` + `&key=${process.env.giphyAPIKey}` + '&limit=1&contentfilter=off');
const q = await axios.get(
'https://tenor.googleapis.com/v2/search?' +
'https://api.giphy.com/v2/search?' +
`&q=${commandData.args}` +
`&key=${process.env.tenorAPIKey}` +
`&key=${process.env.giphyAPIKey}` +
'&limit=1' +
`&contentfilter=off`
).then(async (res) => {

View File

@ -1,6 +1,6 @@
{
"name": "nodbot",
"version": "3.5.0",
"version": "3.6.0",
"description": "Nods and Nod Accessories",
"main": "main.js",
"dependencies": {

View File

@ -1,5 +1,5 @@
const tenor = require('tenorjs').client({
'Key': process.env.tenorAPIKey, // https://tenor.com/developer/keyregistration
'Key': process.env.giphyAPIKey, // https://tenor.com/developer/keyregistration
'Filter': 'off', // "off", "low", "medium", "high", not case sensitive
'Locale': 'en_US',
'MediaFilter': 'minimal',

View File

@ -1,5 +1,5 @@
const tenor = require('tenorjs').client({
'Key': process.env.tenorAPIKey, // https://tenor.com/developer/keyregistration
'Key': process.env.giphyAPIKey, // https://tenor.com/developer/keyregistration
'Filter': 'off', // "off", "low", "medium", "high", not case sensitive
'Locale': 'en_US',
'MediaFilter': 'minimal',

View File

@ -1,5 +1,5 @@
const tenor = require('tenorjs').client({
'Key': process.env.tenorAPIKey, // https://tenor.com/developer/keyregistration
'Key': process.env.giphyAPIKey, // https://tenor.com/developer/keyregistration
'Filter': 'off', // "off", "low", "medium", "high", not case sensitive
'Locale': 'en_US',
'MediaFilter': 'minimal',