Is there an event to detect create a server invite link?

I want to know when user create a link
16 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs2y ago
event (event) Client#inviteCreate Emitted when an invite is created. (more...)
계정 버림
계정 버림OP2y ago
I tried like below but it didnt work
module.exports = {
name: "inviteCreate",
once: false,

execute(member, client){
let id = member.id
console.log(id)
}
}
module.exports = {
name: "inviteCreate",
once: false,

execute(member, client){
let id = member.id
console.log(id)
}
}
Jaworek
Jaworek2y ago
notLikeCrawl look at the params
계정 버림
계정 버림OP2y ago
You mean
execute(member, client){
execute(member, client){
this params? or Client#inviteCreate that params?
Idris
Idris2y ago
you should name it invite not member and console.log(invite)
계정 버림
계정 버림OP2y ago
module.exports = {
name: "inviteCreate",
once: false,

execute(invite){
console.log(invite)

}
}
module.exports = {
name: "inviteCreate",
once: false,

execute(invite){
console.log(invite)

}
}
it didnt Thonk
Jaworek
Jaworek2y ago
it will work with needed intents and good handling
Idris
Idris2y ago
GuildInvites intent is needed
계정 버림
계정 버림OP2y ago
const client = new Client({
intents:[Guilds,GuildMembers,GuildMessages,GuildInvites],
partials:[User,Message,GuildMember,ThreadMember]
})
const client = new Client({
intents:[Guilds,GuildMembers,GuildMessages,GuildInvites],
partials:[User,Message,GuildMember,ThreadMember]
})
like this?
Idris
Idris2y ago
try it
계정 버림
계정 버림OP2y ago
same!
계정 버림
계정 버림OP2y ago
계정 버림
계정 버림OP2y ago
But nothing to log
Jaworek
Jaworek2y ago
create new invite as discord may show you older one
계정 버림
계정 버림OP2y ago
Yeahhhh finally it worksss thank ufor everyone,....
Want results from more Discord servers?
Add your server