mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
Added guild.unban
This commit is contained in:
18
src/client/actions/GuildBanRemove.js
Normal file
18
src/client/actions/GuildBanRemove.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const Action = require('./Action');
|
||||
const Constants = require('../../util/Constants');
|
||||
|
||||
class GuildBanRemove extends Action {
|
||||
|
||||
handle(data) {
|
||||
const client = this.client;
|
||||
|
||||
const guild = client.guilds.get(data.guild_id);
|
||||
const user = client.dataManager.newUser(data.user);
|
||||
|
||||
if (guild && user) {
|
||||
client.emit(Constants.Events.GUILD_BAN_REMOVE, guild, user);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GuildBanRemove;
|
||||
Reference in New Issue
Block a user