fix type guards
This commit is contained in:
@@ -34,7 +34,7 @@ export class ReacordDiscordJs extends Reacord {
|
|||||||
super(config)
|
super(config)
|
||||||
|
|
||||||
client.on("interactionCreate", (interaction) => {
|
client.on("interactionCreate", (interaction) => {
|
||||||
if (interaction.isMessageComponent()) {
|
if (interaction.isButton() || interaction.isSelectMenu()) {
|
||||||
this.handleComponentInteraction(
|
this.handleComponentInteraction(
|
||||||
this.createReacordComponentInteraction(interaction),
|
this.createReacordComponentInteraction(interaction),
|
||||||
)
|
)
|
||||||
@@ -92,7 +92,7 @@ export class ReacordDiscordJs extends Reacord {
|
|||||||
(await this.client.channels.fetch(channelId)) ??
|
(await this.client.channels.fetch(channelId)) ??
|
||||||
raise(`Channel ${channelId} not found`)
|
raise(`Channel ${channelId} not found`)
|
||||||
|
|
||||||
if (!channel.isText()) {
|
if (!channel.isTextBased()) {
|
||||||
raise(`Channel ${channelId} is not a text channel`)
|
raise(`Channel ${channelId} is not a text channel`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user