UNPKG

shadowsb

Version:

A unofficial discord.js fork for creating selfbots [Based on discord.js v13] (discord.js-selfbot-v13) for true version

29 lines (21 loc) 740 B
'use strict'; const Action = require('./Action'); const { Events } = require('../../util/Constants'); class StageInstanceCreateAction extends Action { handle(data) { const client = this.client; const channel = this.getChannel({ id: data.channel_id, guild_id: data.guild_id }); if (channel) { const stageInstance = channel.guild.stageInstances._add(data); /** * Emitted whenever a stage instance is created. * @event Client#stageInstanceCreate * @param {StageInstance} stageInstance The created stage instance */ client.emit(Events.STAGE_INSTANCE_CREATE, stageInstance); return { stageInstance }; } return {}; } } module.exports = StageInstanceCreateAction;