mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-11 13:07:20 +00:00
11 lines
272 B
TypeScript
11 lines
272 B
TypeScript
import { VoiceChannel } from "discord.js";
|
|
|
|
export async function createOrReuseInvite(vc: VoiceChannel) {
|
|
const existingInvites = await vc.fetchInvites();
|
|
|
|
if (existingInvites.size !== 0) {
|
|
return existingInvites[0];
|
|
} else {
|
|
return vc.createInvite();
|
|
}
|
|
}
|