mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-24 13:57:03 -04:00
fixes an issue where the bot would edit deleted replies
This commit is contained in:
parent
bbafd7f48c
commit
4f1d288d3e
11 changed files with 31 additions and 32 deletions
|
@ -41,10 +41,10 @@ module.exports = class BasePaginator extends EventEmitter {
|
|||
async update(data) {
|
||||
if (this.isShared) {
|
||||
for (const m of this.commandMessage.values()) {
|
||||
await m.edit(data);
|
||||
if(!m.deleted) await m.edit(data);
|
||||
}
|
||||
} else if (this.commandMessage) {
|
||||
this.commandMessage.edit(data);
|
||||
if(!this.commandMessage.deleted) this.commandMessage.edit(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,5 +4,6 @@ module.exports.editOrReply = function(context, message, disableReference = false
|
|||
if(!message.message_reference && !disableReference) message.reference = true
|
||||
// Disable mentions
|
||||
if(!message.allowedMentions) message.allowedMentions = {parse: [], repliedUser: false}
|
||||
return context.editOrReply(message)
|
||||
// Only respond if the command is still available.
|
||||
if(!context.message.deleted) return context.editOrReply(message)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue