Command
    
            
            in package
            
        
    
    
    
AbstractYes
Table of Contents
Properties
- $message : Message
 
Methods
- callback() : void
 - Wrapper to properly handle a Command response.
 - description() : string
 - Help-text description of what the command does.
 - name() : string
 - Name to invoke this command on Discord.
 - register() : Command
 - Register a Command class as a command (by passing in the main Discord client) or a subcommand (by passing in the output of this method from its parent command).
 - response() : array<string|int, string>
 - Constructs a textual response to a Command invocation.
 - usage() : string|null
 - Help-text options that can be passed to this command, if any.
 - logException() : void
 
Properties
$message
        protected
            Message
    $message
    
    
    
    
    
    
Methods
callback()
Wrapper to properly handle a Command response.
    public
        final            callback(Message $message, array<string|int, string> $args) : void
    Parameters
- $message : Message
 - $args : array<string|int, string>
 - 
                    
Arguments passed to the command.
 
description()
Help-text description of what the command does.
    public
    abstract                description() : string
    Return values
stringname()
Name to invoke this command on Discord.
    public
    abstract                name() : string
    Return values
stringregister()
Register a Command class as a command (by passing in the main Discord client) or a subcommand (by passing in the output of this method from its parent command).
    public
                    register(Command|DiscordCommandClient $parent) : Command
    Parameters
- $parent : Command|DiscordCommandClient
 
Return values
Commandresponse()
Constructs a textual response to a Command invocation.
    public
    abstract                response(string ...$args) : array<string|int, string>
    Parameters
- $args : string
 
Return values
array<string|int, string>usage()
Help-text options that can be passed to this command, if any.
    public
                    usage() : string|null
    Return values
string|nulllogException()
    protected
                    logException(Throwable $err) : void
    Parameters
- $err : Throwable