From 5d962832413ca2e5ec19b2c3b2b88c49661b4665 Mon Sep 17 00:00:00 2001 From: LunaUrsa <1836049+LunaUrsa@users.noreply.github.com> Date: Sun, 10 Dec 2023 10:07:17 -0600 Subject: [PATCH] turn off logging, add fix for mentioning tripbot's role --- src/discord/utils/messageCommand.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/discord/utils/messageCommand.ts b/src/discord/utils/messageCommand.ts index 60b1baf30..66c84582c 100644 --- a/src/discord/utils/messageCommand.ts +++ b/src/discord/utils/messageCommand.ts @@ -68,7 +68,7 @@ async function isPokingTripbot(message:Message):Promise { } async function isMentioningTripbot(message:Message):Promise { - return message.mentions.users.has(env.DISCORD_CLIENT_ID); + return message.mentions.users.has(env.DISCORD_CLIENT_ID) || message.mentions.roles.has(env.ROLE_TRIPBOT); } async function isUploadMessage(message:Message):Promise { @@ -97,9 +97,9 @@ export async function messageCommand(message: Message): Promise { const displayName = message.member ? message.member.displayName : message.author.username; // log.debug(F, `message: ${JSON.stringify(message, null, 2)}`); - if (message.guild.id === env.DISCORD_GUILD_ID) { - log.debug(F, `message: ${JSON.stringify(message, null, 2)}`); - } // Log messages from tripsit for debugging + // if (message.guild.id === env.DISCORD_GUILD_ID) { + // log.debug(F, `message: ${JSON.stringify(message, null, 2)}`); + // } // Log messages from tripsit for debugging // Ignore messages that start with ~~, these are usually strikethrough messages if (message.content.startsWith('~~')) { return; }