VoiceChannel.activityInvite is not a function
ryzyx opened this issue · 1 comments
ryzyx commented
this is the error im getting running the code.
UnhandledPromiseRejectionWarning: TypeError: VoiceChannel.activityInvite is not a function
my code :
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("857222096191094804")//Voice Channel ID
let Invite = await VoiceChannel.activityInvite("755600276941176913")//Application ID
//For more application IDs you can check ReadMe
message.channel.send("https://discord.com/invite/"+Invite.code)
}
if(message.content === "poker"){
let VoiceChannel = message.member.voice.channelID//Voice Channel ID
let Invite = await VoiceChannel.activityInvite("755827207812677713")//Application ID
//For more application IDs you can check ReadMe
message.channel.send("https://discord.com/invite/"+Invite.code)
}
if(message.content === "betrayal"){
let VoiceChannel = message.member.voice.channelID//Voice Channel ID
let Invite = await VoiceChannel.activityInvite("773336526917861400")//Application ID
//For more application IDs you can check ReadMe
message.channel.send("https://discord.com/invite/"+Invite.code)
}
if(message.content === "fishing"){
let VoiceChannel = message.member.voice.channelID//Voice Channel ID
let Invite = await VoiceChannel.activityInvite("814288819477020702")//Application ID
//For more application IDs you can check ReadMe
message.channel.send("https://discord.com/invite/"+Invite.code)
}
})
client.login('mytokenhehe')
SudhanPlayz commented
Fixed by now