An simple package to create an Activity in Discord Voice Channel using Discord.js
npm install discordjs-activity
# (or)
yarn add 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
require("discordjs-activity")//Import first
const { Client } = require("discord.js")
const client = new 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("youtube_together")//Application Name [youtube_together, fishington, chess_in_the_park, betrayal, poker_night, chess_in_the_park_dev]
if(Invite) {
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!
Application Name: poker_night
Application Name: betrayal
Application Name: youtube_together
Application Name: watch_together_dev
Application Name: fishington
Application Name: chess_in_the_park
Application Name: chess_in_the_park_dev
Application Name: doodlecrew
Application Name: wordsnacks
Application Name: lettertile
Client ID: 879863686565621790
Even more coming soon in future