v3.4.3-dev #29

Merged
voidf1sh merged 10 commits from v3.4.3-dev into main 2025-02-09 22:36:12 +00:00
Showing only changes of commit c330af29fa - Show all commits

View File

@ -22,7 +22,7 @@ module.exports = {
`&key=${process.env.tenorAPIKey}` + `&key=${process.env.tenorAPIKey}` +
'&limit=1' + '&limit=1' +
`&contentfilter=off` `&contentfilter=off`
).then(res => { ).then(async (res) => {
if (process.env.isDev) console.log(res.data.results); if (process.env.isDev) console.log(res.data.results);
if (res.data.results[0] == undefined) { if (res.data.results[0] == undefined) {
message.reply('Sorry I was unable to find a GIF of ' + commandData.args); message.reply('Sorry I was unable to find a GIF of ' + commandData.args);
@ -33,10 +33,10 @@ module.exports = {
// Handle when the invoking message is a reply to someone else // Handle when the invoking message is a reply to someone else
if (message.reference) { if (message.reference) {
// Fetch the referenced message from the channels' MessageManager // Fetch the referenced message from the channels' MessageManager
await message.channel.messages.fetch(message.reference.messageId).then((refMsg) => { await message.channel.messages.fetch(message.reference.messageId).then(async (refMsg) => {
// Send the reply to the referenced message // Send the reply to the referenced message
await refMsg.reply(commandData.embed_url); await refMsg.reply(commandData.embed_url);
}).catch((e) => { }).catch(async (e) => {
// Failed fetching the message from the channel, fallback to regular send // Failed fetching the message from the channel, fallback to regular send
console.error(e); console.error(e);
await message.reply(commandData.embed_url); await message.reply(commandData.embed_url);