fix: assert channel types in message actions (#6919)

This commit is contained in:
SpaceEEC
2021-11-01 18:40:19 +01:00
committed by GitHub
parent 95d2a4d35e
commit 9bd3689fb1
9 changed files with 18 additions and 10 deletions

View File

@@ -6,6 +6,8 @@ class MessageUpdateAction extends Action {
handle(data) {
const channel = this.getChannel(data);
if (channel) {
if (!channel.isText()) return {};
const { id, channel_id, guild_id, author, timestamp, type } = data;
const message = this.getMessage({ id, channel_id, guild_id, author, timestamp, type }, channel);
if (message) {