๐ 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.
export async function parse(old_presence, new_presence)
{
console.log(`${new_presence.member.user.username}'s status changed`)
}
export const conditions = [];
export const any_guild = false;
export const allow_bots = false;
โฏ Exports
At the bottom of the file we have exports, which includes several important elements.
export const conditions = [];
export const any_guild = false;
export const allow_bots = false;
parseโ method to handle the eventany_guildโ if false, the command can be executed only on the main guildallow_botsโ if false, it will ignore events when the user is a bot