dcord.bot.command

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

Members

Aliases

Command
alias Command = CommandConfig!TypeTriggers

Commands (currently not working) are members of Plugin class or classes which inherit from it. See: examples/src/basic.d Example usage: @Command("hello", "hello2") //The command may respond to multiple triggers. @Enabled(true) //false turns the command off. It may be re-enabled elsewhere in code at run-time. @Description("A command that says 'hello' in channel.") //A description of what the command does. @Group("Leet") //The group this command can respond to. @RegEx(true) //Defaults to true, but can disable RegEx handling for command triggers. @CommandLevel(1) //The power level that the command requires ( normal = 1, mod = 50, admin = 100,) void onHello(CommandEvent event) { event.msg.reply("Hello, world!"); }

CommandDescription
alias CommandDescription = CommandConfig!TypeDescription

Undocumented in source.

CommandGroup
alias CommandGroup = CommandConfig!TypeGroup

Undocumented in source.

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.

CommandLevel
alias CommandLevel = CommandConfig!TypeLevel

Undocumented in source.

CommandObjectUpdate
alias CommandObjectUpdate = void delegate(CommandObject)

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

CommandRegex
alias CommandRegex = CommandConfig!TypeRegEx

Undocumented in source.

Description
alias Description = CommandConfig!TypeDescription

Undocumented in source.

Enabled
alias Enabled = CommandConfig!TypeEnabled

Undocumented in source.

Group
alias Group = CommandConfig!TypeGroup

Undocumented in source.

RegEx
alias RegEx = CommandConfig!TypeRegEx

Undocumented in source.

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.

Manifest constants

TypeDescription
enum TypeDescription;

Undocumented in source.

TypeEnabled
enum TypeEnabled;

Undocumented in source.

TypeGroup
enum TypeGroup;

Undocumented in source.

TypeLevel
enum TypeLevel;

Undocumented in source.

TypeRegEx
enum TypeRegEx;

Undocumented in source.

TypeTriggers
enum TypeTriggers;

Undocumented in source.

Mixin templates

Commandable
mixintemplate Commandable()

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

Templates

CommandConfig
template CommandConfig(alias T)

Undocumented in source.

CommandConfig
template CommandConfig(alias T)

Undocumented in source.

CommandConfig
template CommandConfig(alias T)

Undocumented in source.

CommandConfig
template CommandConfig(alias T)

Undocumented in source.

CommandConfig
template CommandConfig(alias T)

Undocumented in source.

CommandConfig
template CommandConfig(alias T)

Undocumented in source.

Meta