Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Create UserUpdate.ts
Browse files Browse the repository at this point in the history
Fixed issue #28
  • Loading branch information
Asplix authored and Bluzzi committed May 23, 2022
1 parent 909963f commit 8de547d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/events/list/UserUpdate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { User } from "discord.js";
import { request } from "../../api/Request";
import { setUsernameAndProfilPicture } from "../../api/requests/Member";
import Event from "../Event";

export default class UserUpdate extends Event {

public name: string = "userUpdate";

public async execute(_: User, newUser: User) : Promise<void> {
request(setUsernameAndProfilPicture, {
id: newUser.id,
username: newUser.username,
profilPicture: newUser.displayAvatarURL({ dynamic: true })
});
}
}

0 comments on commit 8de547d

Please sign in to comment.