Add replies to spongebob
This commit is contained in:
parent
a1f5d6d5a1
commit
73adc1036b
@ -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();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user