mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-14 22:05:01 +00:00
channel typings
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
c33a216857
commit
8347095fa0
15 changed files with 91 additions and 103 deletions
|
@ -1,4 +1,4 @@
|
|||
import { Snowflake, VoiceChannel } from "discord.js";
|
||||
import { ChannelType, Snowflake, VoiceChannel } from "discord.js";
|
||||
import {
|
||||
channelToTemplateSafeChannel,
|
||||
memberToTemplateSafeMember,
|
||||
|
@ -9,7 +9,6 @@ import { LogType } from "../../../data/LogType";
|
|||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { channelMentionRegex, isSnowflake, simpleClosestStringMatch } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
import { ChannelTypeStrings } from "../../../types";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
|
||||
export const VcmoveCmd = utilityCmd({
|
||||
|
@ -48,7 +47,7 @@ export const VcmoveCmd = utilityCmd({
|
|||
} else {
|
||||
// Search string -> find closest matching voice channel name
|
||||
const voiceChannels = [...pluginData.guild.channels.cache.values()].filter(
|
||||
(c): c is VoiceChannel => c.type === ChannelTypeStrings.VOICE,
|
||||
(c): c is VoiceChannel => c.type === ChannelType.GuildVoice,
|
||||
);
|
||||
const closestMatch = simpleClosestStringMatch(args.channel, voiceChannels, (ch) => ch.name);
|
||||
if (!closestMatch) {
|
||||
|
@ -127,7 +126,7 @@ export const VcmoveAllCmd = utilityCmd({
|
|||
} else {
|
||||
// Search string -> find closest matching voice channel name
|
||||
const voiceChannels = [...pluginData.guild.channels.cache.values()].filter(
|
||||
(c): c is VoiceChannel => c.type === ChannelTypeStrings.VOICE,
|
||||
(c): c is VoiceChannel => c.type === ChannelType.GuildVoice,
|
||||
);
|
||||
const closestMatch = simpleClosestStringMatch(args.channel, voiceChannels, (ch) => ch.name);
|
||||
if (!closestMatch) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue