Discord: fix voice command typing

This commit is contained in:
Shadow
2026-02-20 16:31:41 -06:00
parent 4ab946eebf
commit ab27d7b05a
3 changed files with 13 additions and 6 deletions

View File

@@ -2,8 +2,10 @@ import { inspect } from "node:util";
import {
Client,
ReadyListener,
type BaseCommand,
type BaseMessageInteractiveComponent,
type Modal,
type Plugin,
} from "@buape/carbon";
import { GatewayCloseCodes, type GatewayPlugin } from "@buape/carbon/gateway";
import { VoicePlugin } from "@buape/carbon/voice";
@@ -433,7 +435,7 @@ export async function monitorDiscordProvider(opts: MonitorDiscordOpts = {}) {
);
}
const voiceManagerRef: { current: DiscordVoiceManager | null } = { current: null };
const commands = commandSpecs.map((spec) =>
const commands: BaseCommand[] = commandSpecs.map((spec) =>
createDiscordNativeCommand({
command: spec,
cfg,
@@ -524,7 +526,9 @@ export async function monitorDiscordProvider(opts: MonitorDiscordOpts = {}) {
}
}
const clientPlugins = [createDiscordGatewayPlugin({ discordConfig: discordCfg, runtime })];
const clientPlugins: Plugin[] = [
createDiscordGatewayPlugin({ discordConfig: discordCfg, runtime }),
];
if (voiceEnabled) {
clientPlugins.push(new VoicePlugin());
}