An simple package to create an Activity in Discord Voice Channel using Discord.js
npm i discordjs-activity
const { Client } = require("discord.js")//Importing client
const client = new Client()//creating a new discord.js client
require("discordjs-activity")(client)//Importing this package and initiating it with the client
const { Client } = require("discord.js")
const client = new Client()
require("discordjs-activity")(client)
client.on("message", async (message) => {
if(message.author.bot)return
if(message.content === "youtube"){
let VoiceChannel = client.channels.cache.get("Voice Channel ID")//Voice Channel ID
let Invite = await VoiceChannel.activityInvite("755600276941176913")//Application ID
message.channel.send("https://discord.com/invite/"+Invite.code)// send's invite link in the channel
}
})
client.login("Super secret token")
All of our Examples and activites are in examples.js If you have any other problems/questions, you can join our Support Server!