Class: Discordrb::Events::ChannelCreateEvent
- Inherits:
-
Object
- Object
- Discordrb::Events::ChannelCreateEvent
- Defined in:
- lib/discordrb/events/channel_create.rb
Overview
Raised when a channel is created
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#is_private ⇒ Object
readonly
Returns the value of attribute is_private.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#server ⇒ Object
readonly
Returns the value of attribute server.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data, bot) ⇒ ChannelCreateEvent
constructor
A new instance of ChannelCreateEvent.
Constructor Details
#initialize(data, bot) ⇒ ChannelCreateEvent
Returns a new instance of ChannelCreateEvent.
9 10 11 12 13 14 15 16 17 |
# File 'lib/discordrb/events/channel_create.rb', line 9 def initialize(data, bot) @type = data['type'] @topic = data['topic'] @position = data['position'] @name = data['name'] @is_private = data['is_private'] @id = data['id'] @server = bot.server(data['guild_id'].to_i) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/discordrb/events/channel_create.rb', line 7 def id @id end |
#is_private ⇒ Object (readonly)
Returns the value of attribute is_private.
7 8 9 |
# File 'lib/discordrb/events/channel_create.rb', line 7 def is_private @is_private end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/discordrb/events/channel_create.rb', line 7 def name @name end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
7 8 9 |
# File 'lib/discordrb/events/channel_create.rb', line 7 def position @position end |
#server ⇒ Object (readonly)
Returns the value of attribute server.
7 8 9 |
# File 'lib/discordrb/events/channel_create.rb', line 7 def server @server end |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
7 8 9 |
# File 'lib/discordrb/events/channel_create.rb', line 7 def topic @topic end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/discordrb/events/channel_create.rb', line 7 def type @type end |