๐ Persences
Status & activities updates of users and bots
๐ค "Presence"โ
Presence is an object with several data and
methods, you should read discord.js documentation to see
how to work with Presence.
We will handle PresenceUpdate
so you can also take a look at this page:
๐ PresenceUpdateโ
Has two arguments old_presence and new_presence who are instances of
Presence.
โ ๏ธ Warning: old_presence is the user status before the update and new_presence after the update.
async function parse(old_presence, new_presence)
{
console.log(`${new_presence.member.user.username}'s status changed`)
}
module.exports = {
parse
}
โฏ Exports
At the bottom of the file we have exports, which includes several important elements.
module.exports = {
parse,
conditions: [],
any_guild: false,
dm: false,
allow_bots: false
}
parseโ method to handle the eventany_guildโ if false, the command can be executed only on the main guilddmโ if true, we can use this command in direct messagesallow_botsโ if false, it will ignore events when the user is a bot