Class: OnyxCord::Events::ApplicationCommandPermissionsUpdateEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/onyxcord/events/interactions/permissions.rb

Overview

An event for whenever an application command's permissions are updated.

Instance Attribute Summary collapse

Attributes inherited from Event

#bot

Instance Method Summary collapse

Instance Attribute Details

#application_idInteger (readonly)

Returns the ID of the application whose commands were updated.

Returns:

  • (Integer)

    the ID of the application whose commands were updated.



19
20
21
# File 'lib/onyxcord/events/interactions/permissions.rb', line 19

def application_id
  @application_id
end

#command_idInteger? (readonly)

Returns the ID of the application command that was updated.

Returns:

  • (Integer, nil)

    the ID of the application command that was updated.



13
14
15
# File 'lib/onyxcord/events/interactions/permissions.rb', line 13

def command_id
  @command_id
end

#permissionsArray<ApplicationCommand::Permission> (readonly)

Returns the permissions that were updated.

Returns:



16
17
18
# File 'lib/onyxcord/events/interactions/permissions.rb', line 16

def permissions
  @permissions
end

#server_idInteger (readonly)

Returns the ID of the server where the command permissions were updated.

Returns:

  • (Integer)

    the ID of the server where the command permissions were updated.



10
11
12
# File 'lib/onyxcord/events/interactions/permissions.rb', line 10

def server_id
  @server_id
end

Instance Method Details

#serverServer

Returns the server where the command's permissions were updated.

Returns:

  • (Server)

    the server where the command's permissions were updated.



33
34
35
# File 'lib/onyxcord/events/interactions/permissions.rb', line 33

def server
  @bot.server(@server_id)
end