discord.js-temporary-channel

This package create temporary voice channel for discord


Keywords
discord, discord.js, discordjs, discord-temporary-channel, @ds112, @onepiecehung, create-temp-channel, discord-api, discord-bot, discord-js, discord-temp-channel
License
ISC
Install
npm install discord.js-temporary-channel@2.0.0

Documentation

Discord.js-Temporary-Channel (Only for voice channel)

Typescript Node 16

QR

Important

  • Version 4, we support discord.js@14.0.1

  • Version 3, we support discord.js version 13, support typescript

  • Version 2, we support discord.js version 12

  • Version 1, we support discord.js version less than 12

Thanks to Pie from RDVN

npm i discord.js-temporary-channel
yarn add discord.js-temporary-channel
import { Client, GatewayIntentBits, Partials } from "discord.js";

const client = new Client({
    intents: [
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildMessages,
        GatewayIntentBits.GuildVoiceStates,
    ],
    partials: [Partials.Channel],
});

import TVC from "discord.js-temporary-channel";

const VC = new TVC(client, {
    userLimit: 23,
    reason: "powered by ds112",
    nameStartWith: "3AT ",
    nameStartWithTemporary: "* ",
});

// todo: create voice public
VC.autoCreateTemporaryVoiceChannel();

// todo: create voice private, thanks to @nodgear
// Private channel method (Only creator has access)
VC.autoCreateTemporaryVoiceChannelPrivate();
// You need to come up with your own implementation on how to invite another users to this channel.
client.on("ready", () => {
    console.log(`Logged in as ${client?.user?.tag}!`);
});

client.login("TOKEN");

API

autoCreateTemporaryVoiceChannelPrivate(): new channel created will be private @nodgear