mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 18:59:19 +00:00
✨ feat: Support thread channel
This commit is contained in:
@@ -10,7 +10,8 @@ import {
|
||||
TextBasedChannelMixin,
|
||||
ChannelType,
|
||||
BaseGuildVoiceChannel,
|
||||
InteractionType
|
||||
InteractionType,
|
||||
ThreadChannel
|
||||
} from 'discord.js';
|
||||
|
||||
import Logger from '../libs/Logger';
|
||||
@@ -217,7 +218,13 @@ class Discord {
|
||||
|
||||
// Handling guild commands
|
||||
this.client.on('messageCreate', async (message: Message) => {
|
||||
if (!(message.channel instanceof BaseGuildTextChannel || message.channel instanceof BaseGuildVoiceChannel))
|
||||
if (
|
||||
!(
|
||||
message.channel instanceof BaseGuildTextChannel ||
|
||||
message.channel instanceof BaseGuildVoiceChannel ||
|
||||
message.channel instanceof ThreadChannel
|
||||
)
|
||||
)
|
||||
return;
|
||||
if (message.author.bot) return;
|
||||
if (typeof message.guild?.id === 'undefined') return;
|
||||
@@ -324,7 +331,13 @@ class Discord {
|
||||
// Handling mentions
|
||||
this.client.on('messageCreate', async (message: Message) => {
|
||||
// TODO: Handle DMs commands soon
|
||||
if (!(message.channel instanceof BaseGuildTextChannel || message.channel instanceof BaseGuildVoiceChannel))
|
||||
if (
|
||||
!(
|
||||
message.channel instanceof BaseGuildTextChannel ||
|
||||
message.channel instanceof BaseGuildVoiceChannel ||
|
||||
message.channel instanceof ThreadChannel
|
||||
)
|
||||
)
|
||||
return;
|
||||
if (message.author.bot) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user