Skip to content

Commit

Permalink
turn off logging, add fix for mentioning tripbot's role
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Dec 10, 2023
1 parent 71e7353 commit 5d96283
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/discord/utils/messageCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async function isPokingTripbot(message:Message):Promise<boolean> {
}

async function isMentioningTripbot(message:Message):Promise<boolean> {
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<boolean> {
Expand Down Expand Up @@ -97,9 +97,9 @@ export async function messageCommand(message: Message): Promise<void> {
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; }
Expand Down

0 comments on commit 5d96283

Please sign in to comment.