refactor: remove unused getThreads function and related code from voice API and controller

This commit is contained in:
MythEclipse
2026-05-16 23:34:07 +07:00
parent 7dedac2094
commit 99ec528a03
7 changed files with 115 additions and 92 deletions
+3 -8
View File
@@ -4,7 +4,6 @@ import {
disconnectVoice,
getGuilds,
getTextChannels,
getThreads,
getVoiceChannels,
getVoiceStatus,
} from "../api/voice";
@@ -46,13 +45,9 @@ export function useVoiceControl() {
setTextChannels([]);
return [];
}
const [channels, threads] = await Promise.all([
getTextChannels(guildId),
getThreads(guildId).catch(() => []),
]);
const combined = [...channels, ...threads];
setTextChannels(combined);
return combined;
const channels = await getTextChannels(guildId);
setTextChannels(channels);
return channels;
}, []);
const joinVoice = useCallback(async (guildId: string, channelId: string) => {