Files
discord.js/src/client/websocket/packets/handlers/GuildDelete.js
Programmix fe3914658a Grammar cleanup (#875)
This commit:
* fixes inconsistencies (primarily regarding capitalization)
* fixes non-proper nouns that were improperly capitalized
* fixes reminents from not-so-meticulous copy+paste jobs
2016-11-05 23:57:34 +00:00

20 lines
579 B
JavaScript

const AbstractHandler = require('./AbstractHandler');
const Constants = require('../../../../util/Constants');
class GuildDeleteHandler extends AbstractHandler {
handle(packet) {
const client = this.packetManager.client;
const data = packet.d;
const response = client.actions.GuildDelete.handle(data);
if (response.guild) client.emit(Constants.Events.GUILD_DELETE, response.guild);
}
}
/**
* Emitted whenever a guild is deleted/left.
* @event Client#guildDelete
* @param {Guild} guild The guild that was deleted
*/
module.exports = GuildDeleteHandler;