Documentation

MagicEightBall extends Command
in package

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
Help-text options that can be passed to this command, if any.
logException()  : void

Properties

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 description() : string
Return values
string

name()

Name to invoke this command on Discord.

public name() : string
Return values
string

register()

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
Command

response()

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
Return values
string

logException()

protected logException(Throwable $err) : void
Parameters
$err : Throwable

        
On this page

Search results