Discord#

Implements a bot backend for Discord.

Identities#

The Discord backend implements the following identities, which can be used to limit commands to certain users, guilds, channels, etc…

Identities#

Type

Description

user

A unique user ID (not a username)

channel

A unique channel ID (not a name)

guild

A unique guild ID (not a name)

API#

class clicky.backends.discord.DiscordBackend(app: Clicky, name: str, backend: BackendConfig)#
async run()#

Take over the process and start the bot. This will be called only after forking the process, so you can do whatever you want here.

class clicky.backends.discord.DiscordMessageContext(say)#
async post_run(*, duration)#

Called after a command has finished executing.

async pre_run()#

Called before a command is executed.

async reply(reply_type: ReplyType, message: str)#

Called whenever the command wants to return data to the user.