dscord.bot.command

Utilities for building user-controlled commands with the dscord bot interface

Members

Aliases

Command
alias Command = CommandConfig!TypeTriggers

Commands are members of Plugin class or classes which inherit from it. See: examples/src/basic.d Example usage:

CommandHandler
alias CommandHandler = void delegate(CommandEvent)

A delegate type which represents a function used for handling commands.

CommandHandlerWrapper
alias CommandHandlerWrapper = bool delegate(CommandEvent)

A delegate type which represents a function used for filtering commands.

CommandObjectUpdate
alias CommandObjectUpdate = void delegate(CommandObject)

A delegate type which can be used in UDAs to adjust a CommandObject's settings or behavior.

Classes

CommandEvent
class CommandEvent

Special event encapsulating MessageCreates, containing specific Bot utilties and functionality.

CommandObject
class CommandObject

A CommandObject represents the configuration/state for a single command.

Enums

Level
enum Level

Base set of levels plugins can use.

Functions

CommandChannelPermission
CommandObjectUpdate CommandChannelPermission(Permission p)

Sets a channel permission requirement.

CommandGuildPermission
CommandObjectUpdate CommandGuildPermission(Permission p)

Sets a guild permission requirement.

Mixin templates

Commandable
mixin template Commandable()

The Commandable template is a virtual implementation which handles the command UDAs, storing them within a local "commands" mapping.

Meta