1 |
import { Collection, Message, NonThreadGuildBasedChannel, Role } from "discord.js"; |
2 |
import DiscordClient from "../../client/Client"; |
3 |
import BaseEvent from "../../utils/structures/BaseEvent"; |
4 |
|
5 |
export default class RoleUpdateEvent extends BaseEvent { |
6 |
constructor() { |
7 |
super('roleUpdate'); |
8 |
} |
9 |
|
10 |
async run(client: DiscordClient, oldRole: Role, newRole: Role) { |
11 |
if (oldRole.name === newRole.name && oldRole.icon === newRole.icon) |
12 |
return; |
13 |
|
14 |
await client.logger.onRoleUpdate(oldRole, newRole); |
15 |
} |
16 |
} |