mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 18:59:19 +00:00
Fixed suppress embeds crash
This commit is contained in:
@@ -10,7 +10,9 @@ import {
|
||||
User,
|
||||
SelectMenuInteraction,
|
||||
InteractionType,
|
||||
BaseInteraction
|
||||
BaseInteraction,
|
||||
GuildBasedChannel,
|
||||
ChannelType
|
||||
} from 'discord.js';
|
||||
|
||||
export default class DiscordModule {
|
||||
@@ -87,6 +89,13 @@ export class HybridInteractionMessage {
|
||||
return this.data.channel;
|
||||
}
|
||||
|
||||
public getGuildChannel(): GuildBasedChannel | null {
|
||||
if (this.data.channel && this.data.channel.type !== ChannelType.DM) {
|
||||
return this.getChannel() as GuildBasedChannel;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public getGuild(): Guild | null {
|
||||
return this.data.guild;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user