bot.onUserUpdate
An event that gets executed, if the bot sees a user updating it's profile. To let the bot listen to the event, add one bot.onUserUpdate() callback inside your mainfile.
This callback triggers every time a user updates their profile.

Usage:

1
bot.userUpdateCommand({ //command
2
channel: "channel id", //the channel where the bot will log
3
code: `your code` //Message that will be sent to <channel>
4
})
Copied!

Example Command:

1
bot.userUpdateCommand({
2
channel: "772414449839636490",
3
code: `$username has updated their avatar. Old avatar:
4
$oldUser[avatar]
5
`
6
})
Copied!

Options:

You can use the functions $oldUser[] with the options below to return old user data.
  • id - The ID of the user
  • partial - Whether the User structure is partial or not
  • avatar - The old avatar of the user
  • system - Whether the user is part of the official discord team
  • discriminator - The outdated discriminator for this user
  • tag - The tag for this user
  • bot - Whether the user is a bot or not
  • username - The old username of this user
  • status - The status of this user
  • activities - The activities for this user
Last modified 1mo ago
Copy link
Edit on GitHub