refactor(actions): safer getChannel calls

backport #10434
This commit is contained in:
Elysia
2024-09-17 20:23:59 +07:00
parent aed4d149b3
commit fb510d9bf5
11 changed files with 11 additions and 11 deletions

View File

@@ -6,7 +6,7 @@ const { Events } = require('../../util/Constants');
class MessageReactionRemoveAll extends Action {
handle(data) {
// Verify channel
const channel = this.getChannel(data);
const channel = this.getChannel({ id: data.channel_id, guild_id: data.guild_id });
if (!channel || !channel.isText()) return false;
// Verify message