Skip to content

Commit

Permalink
Updated src_modules/voice_commands/index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Sep 1, 2023
1 parent f248da2 commit 4b68e91
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src_modules/voice_commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// extcord module
// requires fastest-levenshtein@^1.0.16 lru-cache@^10.0.1

import { GatewayIntentBits, Guild, VoiceState } from "discord.js";
import { GatewayIntentBits, Guild, VoiceState, VoiceConnection } from "discord.js";

Check failure on line 4 in src_modules/voice_commands/index.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

'"discord.js"' has no exported member named 'VoiceConnection'. Did you mean 'APIConnection'?
import { getVoiceConnection } from "@discordjs/voice";

import { BooleanGuildConfigEntry, Bot, Logger, Module, NumberConfigEntry, SimplePhrase, StringConfigEntry } from "../..";
import { BooleanGuildConfigEntry, Bot, Logger, Module, SimplePhrase, StringConfigEntry, NumberConfigEntry } from "../..";

import { GuildListener } from "./GuildListener";
import { VoiceBackendClient } from "./VoiceBackendClient";
Expand Down Expand Up @@ -162,6 +163,10 @@ export default class VoiceCommandsModule extends Module {
}
}
}

public getConnection(guild: Guild): VoiceConnection | undefined {
return getVoiceConnection(guild.id);
}

private onReady() {
if (this.voiceStateUpdateHandler !== undefined) {
Expand Down

0 comments on commit 4b68e91

Please sign in to comment.