Invite
extends Command
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- 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
$client
protected
DiscordCommandClient
$client
$message
protected
Message
$message
Methods
__construct()
public
__construct(DiscordCommandClient $client) : mixed
Parameters
- $client : DiscordCommandClient
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
description() : string
Return values
stringname()
Name to invoke this command on Discord.
public
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
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