Update to discord.js v13.8.0, adding support for text-in-voice

This commit is contained in:
Dragory 2022-06-13 21:19:56 +03:00
parent ba78103807
commit b05fbe1d04
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
32 changed files with 151 additions and 149 deletions

View file

@ -20,17 +20,17 @@ export const ViewCounterCmd = typedGuildCommand<CountersPluginType>()({
},
{
counterName: ct.string(),
channel: ct.textChannel(),
channel: ct.guildTextBasedChannel(),
},
{
counterName: ct.string(),
channel: ct.textChannel(),
channel: ct.guildTextBasedChannel(),
user: ct.resolvedUser(),
},
{
counterName: ct.string(),
user: ct.resolvedUser(),
channel: ct.textChannel(),
channel: ct.guildTextBasedChannel(),
},
],
@ -68,7 +68,7 @@ export const ViewCounterCmd = typedGuildCommand<CountersPluginType>()({
}
const potentialChannel = pluginData.guild.channels.resolve(reply.content as Snowflake);
if (!potentialChannel || !(potentialChannel instanceof TextChannel)) {
if (!potentialChannel?.isText()) {
sendErrorMessage(pluginData, message.channel, "Channel is not a text channel, cancelling");
return;
}