Fix match_messages filters breaking when message doesn't have text content
This commit is contained in:
parent
2c0bcb012a
commit
5c62c0752f
1 changed files with 1 additions and 1 deletions
|
@ -560,7 +560,7 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema, ICustomOverride
|
||||||
const messageInfo: MessageInfo = { channelId: msg.channel_id, messageId: msg.id, userId: msg.user_id };
|
const messageInfo: MessageInfo = { channelId: msg.channel_id, messageId: msg.id, userId: msg.user_id };
|
||||||
const member = this.guild.members.get(msg.user_id);
|
const member = this.guild.members.get(msg.user_id);
|
||||||
|
|
||||||
if (trigger.match_messages) {
|
if (msg.data.content && trigger.match_messages) {
|
||||||
const str = msg.data.content;
|
const str = msg.data.content;
|
||||||
const matchResult = await matchFn(str);
|
const matchResult = await matchFn(str);
|
||||||
if (matchResult) {
|
if (matchResult) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue