Merge pull request #16 from voidf1sh/3.0.7

3.0.7 Add Replies to Spongebob
This commit is contained in:
Skylar Grant 2023-01-07 20:23:09 -05:00 committed by GitHub
commit 1b7bb46476
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 5 deletions

View File

@ -106,3 +106,5 @@ v3.0.2 - Add medical advice commands
v3.0.3 - Fix broken `/requests` command v3.0.3 - Fix broken `/requests` command
v3.0.4 - Add ability to use multiple aliases v3.0.4 - Add ability to use multiple aliases
v3.0.5 - Add ability to save strains v3.0.5 - Add ability to save strains
v3.0.6 - Move `.strain` to `/strain` and add Autocomplete
v3.0.7 - Add `.spongebob` replies

View File

@ -10,8 +10,21 @@ module.exports = {
// message.reply(fn.spongebob(commandData)).then(() => { // message.reply(fn.spongebob(commandData)).then(() => {
// message.delete(); // message.delete();
// }); // });
message.channel.send(fn.spongebob(commandData)).then(() => { if (message.reference != undefined) {
message.delete(); const repliedMessageId = message.reference.messageId;
}); message.channel.messages.fetch(repliedMessageId)
.then(repliedMessage => {
repliedMessage.reply(fn.spongebob({ args: repliedMessage.content })).then(() => {
message.delete();
});
})
.catch(err => {
console.error(err);
});
} else {
message.channel.send(fn.spongebob(commandData)).then(() => {
message.delete();
});
}
} }
} }

View File

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