Skip to content

Commit

Permalink
Update check in funny react to message function
Browse files Browse the repository at this point in the history
  • Loading branch information
89Q12 committed Feb 5, 2024
1 parent 83c49cf commit 749aa3f
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { On } from '@discord-nestjs/core';
import { Inject, Injectable, UseGuards } from '@nestjs/common';
import { Attachment, Message } from 'discord.js';
import { Attachment, GuildTextBasedChannel, Message } from 'discord.js';
import { MessageFromUserGuard } from 'src/bot/guards/message-from-user.guard';
import { ChannelIdGuard } from 'src/bot/guards/message-in-channel.guard';
import { IsUserUnlockedGuard } from 'src/bot/guards/user-is-unlocked.guard';
Expand Down Expand Up @@ -66,7 +66,12 @@ export default class GuildMessageHandler {
@On('messageCreate')
@UseGuards(MessageFromUserGuard)
async toniMsgsToBird(message: Message): Promise<void> {
if (message.author.id === '1132244079242133555') {
const channel = message.channel as GuildTextBasedChannel;
if (
message.author.id === '1132244079242133555' &&
channel.parentId !== '1011529685357838376' &&
channel.parentId !== '1051979218164125826'
) {
message.react('1194715694948946030');
}
}
Expand Down

0 comments on commit 749aa3f

Please sign in to comment.