Class: Discordrb::Events::AwaitEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/discordrb/events/await.rb

Overview

See Also:

  • Bot#await

Instance Attribute Summary collapse

Attributes inherited from Event

#bot

Instance Method Summary collapse

Constructor Details

#initialize(await, event, bot) ⇒ AwaitEvent

For internal use only



29
30
31
32
33
# File 'lib/discordrb/events/await.rb', line 29

def initialize(await, event, bot)
  @await = await
  @event = event
  @bot = bot
end

Instance Attribute Details

#attributesHash (readonly)

Returns a hash of attributes defined on the await.

Returns:

  • (Hash)

    a hash of attributes defined on the await.

See Also:



26
# File 'lib/discordrb/events/await.rb', line 26

delegate :key, :type, :attributes, to: :await

#awaitAwait (readonly)

The await that was triggered.

Returns:



11
12
13
# File 'lib/discordrb/events/await.rb', line 11

def await
  @await
end

#eventEvent (readonly)

The event that triggered the await.

Returns:



15
16
17
# File 'lib/discordrb/events/await.rb', line 15

def event
  @event
end

#keySymbol (readonly)

Returns the await's key.

Returns:

  • (Symbol)

    the await's key.

See Also:



26
# File 'lib/discordrb/events/await.rb', line 26

delegate :key, :type, :attributes, to: :await

#typeClass (readonly)

Returns the await's event class.

Returns:

  • (Class)

    the await's event class.

See Also:



26
# File 'lib/discordrb/events/await.rb', line 26

delegate :key, :type, :attributes, to: :await