The OpenD Programming Language

arsd.discord

Module for interacting with the Discord chat service. I use it to run a discord bot providing some slash commands.

More...

Members

Classes

DiscordChannel
class DiscordChannel

https://discord.com/developers/docs/resources/channel

DiscordEntity
class DiscordEntity

Base class to represent some object on Discord, e.g. users, channels, etc., through its subclasses.

DiscordGatewayConnection
class DiscordGatewayConnection
DiscordGuild
class DiscordGuild
DiscordMentionable
class DiscordMentionable

Represents something mentionable on Discord with @name - roles and users.

DiscordRestApi
class DiscordRestApi

Most the magic is inherited from arsd.http2.HttpApiClient.

DiscordRole
class DiscordRole
DiscordUser
class DiscordUser

https://discord.com/developers/docs/resources/user

SendingUser
class SendingUser

A SendingUser is a special DiscordUser type that just represents the person who sent the message.

SlashCommandHandler
class SlashCommandHandler

You can create your own slash command handlers by subclassing this and writing methods like

Structs

ChoicesFromFile
struct ChoicesFromFile

Use as a UDA

Detailed Description

Meta

History

Started April 20, 2024.