3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-11 13:07:20 +00:00

More rework progress, mostly done up to ModActions

This commit is contained in:
Dark 2021-06-01 04:33:02 +02:00
parent 3883b5b749
commit 293a850075
38 changed files with 199 additions and 241 deletions

View file

@ -1,9 +1,11 @@
export async function createOrReuseInvite(vc: VoiceChannel) {
const existingInvites = await vc.getInvites();
import { VoiceChannel } from "discord.js";
if (existingInvites.length !== 0) {
export async function createOrReuseInvite(vc: VoiceChannel) {
const existingInvites = await vc.fetchInvites();
if (existingInvites.size !== 0) {
return existingInvites[0];
} else {
return vc.createInvite(undefined);
return vc.createInvite();
}
}