class Discordrb::Events::ChannelDeleteEvent
Raised when a channel is deleted
Attributes
id[R]
@return [Integer] the channel's ID
name[R]
@return [String] the channel's name
owner_id[R]
@return [Integer, nil] the channel's owner ID if this is a group channel
position[R]
@return [Integer] the position of the channel on the list
server[R]
@return [Server] the channel's server
topic[R]
@return [String] the channel's topic
type[R]
@return [Integer] the channel's type (0: text, 1: private, 2: voice, 3: group).
Public Class Methods
new(data, bot)
click to toggle source
# File lib/discordrb/events/channels.rb, line 86 def initialize(data, bot) @bot = bot @type = data['type'] @topic = data['topic'] @position = data['position'] @name = data['name'] @is_private = data['is_private'] @id = data['id'].to_i @server = bot.server(data['guild_id'].to_i) if data['guild_id'] @owner_id = bot.user(data['owner_id']) if @type == 3 end