Improve .gif replies, testing only
All checks were successful
NodBot PE Dockerization / build (push) Successful in 1m21s
All checks were successful
NodBot PE Dockerization / build (push) Successful in 1m21s
This commit is contained in:
parent
bb7c66d8db
commit
9d819253e0
@ -1,4 +1,7 @@
|
||||
## v3.4.x
|
||||
#### v3.4.3 (#29)
|
||||
* [WIP] Fix `.gif` replies to redirect to the original replyee
|
||||
|
||||
#### v3.4.2 (#28)
|
||||
* Added `.drink` and aliases
|
||||
|
||||
@ -32,4 +35,4 @@ v3.0.4 - Add ability to use multiple aliases
|
||||
v3.0.5 - Add ability to save strains
|
||||
v3.0.6 - Move `.strain` to `/strain` and add Autocomplete
|
||||
v3.0.7 - Add `.spongebob` replies
|
||||
v3.0.8 - Add ability to open requests by pages
|
||||
v3.0.8 - Add ability to open requests by pages
|
||||
|
||||
@ -29,7 +29,21 @@ module.exports = {
|
||||
return;
|
||||
};
|
||||
commandData.embed_url = res.data.results[0].url;
|
||||
message.reply(commandData.embed_url);
|
||||
|
||||
// Handle when the invoking message is a reply to someone else
|
||||
if (message.reference) {
|
||||
// Fetch the referenced message from the channels' MessageManager
|
||||
await message.channel.messages.fetch(message.reference.messageId).then((refMsg) => {
|
||||
// Send the reply to the referenced message
|
||||
await refMsg.reply(commandData.embed_url);
|
||||
}).catch((e) => {
|
||||
// Failed fetching the message from the channel, fallback to regular send
|
||||
console.error(e);
|
||||
await message.reply(commandData.embed_url);
|
||||
});
|
||||
} else {
|
||||
await message.reply(commandData.embed_url);
|
||||
}
|
||||
}).catch(err => console.error(err));
|
||||
// tenor.Search.Query(commandData.args, "1").then(res => {
|
||||
// if (res[0] == undefined) {
|
||||
@ -51,4 +65,4 @@ module.exports = {
|
||||
message.reply(gifData.url);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nodbot",
|
||||
"version": "3.4.2",
|
||||
"version": "3.4.3",
|
||||
"description": "Nods and Nod Accessories",
|
||||
"main": "main.js",
|
||||
"dependencies": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user