Class: ESM::Event::ServerInitializationV1
- Inherits:
-
Object
- Object
- ESM::Event::ServerInitializationV1
- Defined in:
- lib/esm/event/server_initialization_v1.rb
Instance Attribute Summary collapse
-
#packet ⇒ Object
readonly
Returns the value of attribute packet.
Instance Method Summary collapse
-
#initialize(connection:, server:, parameters:) ⇒ ServerInitializationV1
constructor
A new instance of ServerInitializationV1.
- #run! ⇒ Object
-
#update ⇒ Object
Called when an admin updates some settings.
Constructor Details
#initialize(connection:, server:, parameters:) ⇒ ServerInitializationV1
Returns a new instance of ServerInitializationV1.
8 9 10 11 12 13 14 |
# File 'lib/esm/event/server_initialization_v1.rb', line 8 def initialize(connection:, server:, parameters:) @connection = connection @server = server @params = parameters @community = @server.community @guild = ESM.bot.server(@community.guild_id) end |
Instance Attribute Details
#packet ⇒ Object (readonly)
Returns the value of attribute packet.
6 7 8 |
# File 'lib/esm/event/server_initialization_v1.rb', line 6 def packet @packet end |
Instance Method Details
#run! ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/esm/event/server_initialization_v1.rb', line 16 def run! # Updates the database with information from the server initialize_server! # We need to let the DLL know some stuff (namely a lot of stuff) build_settings_packet # Send packet to server send_response end |
#update ⇒ Object
Called when an admin updates some settings.
28 29 30 31 32 33 34 |
# File 'lib/esm/event/server_initialization_v1.rb', line 28 def update # We need to let the DLL know some stuff (namely a lot of stuff) build_settings_packet # Send packet to server send_response end |