Wednesday, July 15, 2026 4:57:28 AM
> uptime.rb
# frozen_string_literal: true

module ESM
  module Command
    module Server
      class Uptime < ApplicationCommand
        #################################
        #
        # Arguments (required first, then order matters)
        #

        # See Argument::TEMPLATES[:server_id]
        argument :server_id, display_name: :for

        #
        # Configuration
        #

        command_type :player

        does_not_require :registration

        #################################

        def on_execute
          embed =
            ESM::Embed.build do |e|
              e.description = I18n.t("commands.uptime.server_uptime", server: target_server.server_id, time: target_server.uptime)
            end

          reply(embed)
        end
      end
    end
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 43aa0d7