mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Allow Automod to act on application command replies
This commit is contained in:
parent
ce8618957f
commit
57705656f9
1 changed files with 4 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
import { Message, Snowflake } from "discord.js";
|
||||
import { Constants, Message, MessageType, Snowflake } from "discord.js";
|
||||
import { messageSaverEvt } from "../types";
|
||||
import { SECONDS } from "../../../utils";
|
||||
|
||||
|
@ -12,14 +12,15 @@ setInterval(() => {
|
|||
}
|
||||
}, 60 * SECONDS);
|
||||
|
||||
const AFFECTED_MESSAGE_TYPES: MessageType[] = ["DEFAULT", "REPLY", "APPLICATION_COMMAND"];
|
||||
|
||||
export const MessageCreateEvt = messageSaverEvt({
|
||||
event: "messageCreate",
|
||||
allowBots: true,
|
||||
allowSelf: true,
|
||||
|
||||
async listener(meta) {
|
||||
// Only save regular chat messages
|
||||
if (meta.args.message.type !== "DEFAULT" && meta.args.message.type !== "REPLY") {
|
||||
if (!AFFECTED_MESSAGE_TYPES.includes(meta.args.message.type)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue