discordapi.slash.command

Module Contents

Classes

Option

String

Integer

Boolean

UserOption

ChannelOption

RoleOption

Mentionable

Number

SlashCommand

SubCommand

SubCommandGroup

SlashCommandManager

Context

Object which automatically sets the attribute based on a dict object.

class discordapi.slash.command.Option(type_, name, desc, choices, required, opts=None)
_json(self)
classmethod from_command(cls, cmd)
class discordapi.slash.command.String(name, desc, choices=None, required=False)

Bases: Option

Inheritance diagram of discordapi.slash.command.String
class discordapi.slash.command.Integer(name, desc, choices=None, required=False)

Bases: Option

Inheritance diagram of discordapi.slash.command.Integer
class discordapi.slash.command.Boolean(name, desc, required=False)

Bases: Option

Inheritance diagram of discordapi.slash.command.Boolean
class discordapi.slash.command.UserOption(name, desc, required=False)

Bases: Option

Inheritance diagram of discordapi.slash.command.UserOption
class discordapi.slash.command.ChannelOption(name, desc, required=False)

Bases: Option

Inheritance diagram of discordapi.slash.command.ChannelOption
class discordapi.slash.command.RoleOption(name, desc, required=False)

Bases: Option

Inheritance diagram of discordapi.slash.command.RoleOption
class discordapi.slash.command.Mentionable(name, desc, required=False)

Bases: Option

Inheritance diagram of discordapi.slash.command.Mentionable
class discordapi.slash.command.Number(name, desc, choices=None, required=False)

Bases: Option

Inheritance diagram of discordapi.slash.command.Number
class discordapi.slash.command.SlashCommand(func, name, desc, options=[], default_permission=True, argcheck=True)
classmethod create(cls, desc, options=[], default_permission=True, cmdname=None)
execute(self, ctx, options, manager)
_json(self)
class discordapi.slash.command.SubCommand(name, desc, *commands, default_permission=True)

Bases: SlashCommand

Inheritance diagram of discordapi.slash.command.SubCommand
run(self, ctx, **kwargs)
class discordapi.slash.command.SubCommandGroup(name, desc, *commands, default_permission=True)

Bases: SubCommand

Inheritance diagram of discordapi.slash.command.SubCommandGroup
class discordapi.slash.command.SlashCommandManager(client=None)
_set_client(self, client)
register(self, command)
update(self)
execute(self, ctx)
respond(self, ctx, type_, message=None)
edit(self, ctx, content=EMPTY, file=None, embeds=EMPTY, allowed_mentions=EMPTY, components=EMPTY)
delete(self, ctx)
class discordapi.slash.command.Context(client, data)

Bases: discordapi.dictobject.DictObject

Inheritance diagram of discordapi.slash.command.Context

Object which automatically sets the attribute based on a dict object.

_json

The original dict object in which the class was constructed from.

Constructs the class from the data.

This automatically sets the attributes from the dict. additionally, keys in keylist will be set as an attribute with the value of None when the attribute doesn’t exist- this is to ensure that it won’t overwrite the existing keys when running __init__ in already initialized instance.

__str__(self)

Return str(self).

__repr__(self)

Return repr(self).