Class: Discordrb::Events::ApplicationCommandPermissionsUpdateEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/discordrb/events/interactions.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_id ⇒ Integer (readonly)

Returns the ID of the application whose commands were updated.

Returns:

  • (Integer) —

    the ID of the application whose commands were updated.



592
593
594
# File 'lib/discordrb/events/interactions.rb', line 592

def application_id
  @application_id
end

#command_id ⇒ Integer? (readonly)

Returns the ID of the application command that was updated.

Returns:

  • (Integer, nil) —

    the ID of the application command that was updated.



586
587
588
# File 'lib/discordrb/events/interactions.rb', line 586

def command_id
  @command_id
end

#permissions ⇒ Array<ApplicationCommand::Permission> (readonly)

Returns the permissions that were updated.

Returns:



589
590
591
# File 'lib/discordrb/events/interactions.rb', line 589

def permissions
  @permissions
end

#server_id ⇒ Integer (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.



583
584
585
# File 'lib/discordrb/events/interactions.rb', line 583

def server_id
  @server_id
end

Instance Method Details

#server ⇒ Server

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

Returns:

  • (Server) —

    the server where the command's permissions were updated.



606
607
608
# File 'lib/discordrb/events/interactions.rb', line 606

def server
  @bot.server(@server_id)
end