From 5935c86079de5c198a126ec5a2553d3f976848f3 Mon Sep 17 00:00:00 2001 From: MARCROCK22 Date: Sun, 19 Jan 2025 14:48:18 -0400 Subject: [PATCH] fix: enforce AllGuildVoiceChannels as ReturnType --- src/structures/VoiceState.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/structures/VoiceState.ts b/src/structures/VoiceState.ts index 75333df..d66a383 100644 --- a/src/structures/VoiceState.ts +++ b/src/structures/VoiceState.ts @@ -1,10 +1,9 @@ -import type { UserStructure, UsingClient, VoiceStateStructure } from '../'; +import type { AllGuildVoiceChannels, UserStructure, UsingClient, VoiceStateStructure } from '../'; import type { GuildStructure, ReturnCache } from '../../src'; import type { VoiceStateResource } from '../cache/resources/voice-states'; import { type GuildMemberStructure, Transformers } from '../client/transformers'; import type { ObjectToLower } from '../common'; import type { APIVoiceState } from '../types'; -import type { AllChannels } from './channels'; import { Base } from './extra/Base'; export interface VoiceState extends Base, ObjectToLower> {} @@ -31,8 +30,8 @@ export class VoiceState extends Base { return this.client.users.fetch(this.userId, force); } - channel(mode?: 'rest' | 'flow'): Promise; - channel(mode: 'cache'): ReturnCache; + channel(mode?: 'rest' | 'flow'): Promise; + channel(mode: 'cache'): ReturnCache; channel(mode: 'cache' | 'rest' | 'flow' = 'flow') { if (!this.channelId) return mode === 'cache' ? (this.client.cache.adapter.isAsync ? Promise.resolve() : undefined) : Promise.resolve();