mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
21 lines
632 B
JavaScript
21 lines
632 B
JavaScript
'use strict';
|
|
|
|
const Action = require('./Action');
|
|
const { Events } = require('../../util/Constants');
|
|
|
|
class GuildBanRemove extends Action {
|
|
handle(data) {
|
|
const client = this.client;
|
|
const guild = client.guilds.get(data.guild_id);
|
|
const user = client.users.add(data.user);
|
|
/**
|
|
* Emitted whenever a member is unbanned from a guild.
|
|
* @event Client#guildBanRemove
|
|
* @param {Guild} guild The guild that the unban occurred in
|
|
* @param {User} user The user that was unbanned
|
|
*/
|
|
if (guild && user) client.emit(Events.GUILD_BAN_REMOVE, guild, user);
|
|
}
|
|
}
|
|
|
|
module.exports = GuildBanRemove;
|