DiscordPHP-BridgeBot Documentation

Application

Table of Contents

Interfaces

Avatars
A connector that can say what somebody looks like.
Editing
A connector whose network lets a message already sent be rewritten.
Media
A connector whose network can carry a picture rather than a link to one, in both directions.
ProvidesActions
A connector that brings commands of its own.
ProvidesModules
A connector that brings Discord-side features an {@see \Bridge\Command\Action} cannot express.
Connector
One network the bot bridges Discord with.
Module
A self-contained Discord-side feature that attaches its own listeners once the gateway is ready.

Classes

BridgeActions
The six commands every connector gets: `link`, `here`, `unlink`, `list`, `status` and `reset`.
CoreActions
`/bridge` — the commands that are about the bot rather than about any one network.
Bot
The bot: one Discord gateway connection, one HTTP client, and however many connectors the application installed.
PanelBuilder
A {@see MessageBuilder} that is a Components v2 panel: one accented {@see Container} that everything else is added to.
Action
One command, declared once and registered into every chat the bot is in.
ActionError
An action failing for a reason the person who typed it should read.
ActionRegistry
The catalogue of every action the bot knows, and the single place every adapter looks when it wires itself up.
Arguments
The arguments to one command invocation, parsed the same way on both surfaces.
ChatDispatcher
Runs commands typed in a connector's own chat — Twitch chat, a Telegram group.
ChatInvocation
Somebody typing a command in a connector's own chat, as far as the {@see ChatDispatcher} needs to know.
Context
Everything an action knows about the invocation it is servicing: who asked, from where, what they are allowed to do, and — the interesting part — which room on which network the action should act upon.
Cooldowns
How long somebody must wait before running the same command again.
DiscordAdapter
Registers the action catalogue into DiscordPHP's `MessageCommandClient`, as prefix commands.
Slash
How an {@see Action} presents itself as a Discord slash command.
SlashAdapter
Registers actions that carry a {@see Slash} spec as Discord slash commands.
SlashOption
One typed parameter of a slash command.
Surface
Which chat an action was invoked from, and what that chat can take.
Config
What the bot itself needs to start, as opposed to what any one connector needs.
Environment
The process environment, plus a `.env` file, read once and shared.
ComponentRouter
Routes button and select-menu presses by `custom_id`.
Links
The routing table for one connector: which Discord channel is bridged to which of that platform's rooms.
Incoming
One message, as it arrived from a connector's network.
Media
A picture or a file attached to a message.
Outgoing
A Discord message on its way out to another network, before anyone has decided what it should look like there.
ChatRelay
The relay itself: Discord chat out to every connector, and every connector's chat back into Discord.
MessageMap
Remembers which message on one network became which message on the other, so an edit can follow it across.
OutboundPacer
Paces what the bot says *into* Discord, per channel, across every connector.
WebhookDelivery
Posts another network's chat into Discord.
Room
A place on another network that a Discord channel can be bridged to: a Twitch channel, a Telegram group, whatever a later connector brings.
Store
Every bridge the bot has, for every connector, in one file.
BridgeCheck
Turns the result of the startup check into something a human can act on.
CommandSync
Decides whether the application command Discord already has still matches the one this build defines.
DiscordMedia
Recognises a link to a picture on Discord's own CDN.
Filesystem
Every disk access the bridge makes while the event loop is running, in one place, behind promises.
Format
Renders an answer for whichever chat asked the question.
GatewayDiagnostics
Turns a Discord gateway close code into something you can act on.
InstallCheck
Reads the application's install settings back and says what is wrong with them, once, at startup.
JsonFile
A JSON document on disk that survives restarts, crashes and a careless text editor — and that is written without stopping the event loop.
MessageText
Turning a message from one network into text the other will accept.
Permissions
Works out which rung of {@see Access} a Discord message's author stands on.
RateLimiter
A token bucket: how the bot stays under somebody else's send limit.
ControlActions
What the bridge can do *to* a Telegram chat, beyond relaying into it.
Media
Works out what a Telegram message is carrying besides text, and whether the bridge can mirror it into Discord.
Panels
The buttons on a `/telegram chat info` panel.
TelegramAdapter
Runs the whole catalogue from a Telegram chat.
TelegramConfig
What the Telegram connector needs to start, read from the same environment the bot itself was.
TelegramConnector
Telegram, as far as the bridge is concerned.
TelegramGateway
Owns the Telegram side of the bridge: the update subscription, and a paced outbound queue.
TelegramText
The parts of turning a message into text that are Telegram's rules rather than anybody's.
ApiActions
`api` — the rest of Helix.
ChannelActions
Reading and editing the channel: title, category, tags, and the rest of what `PATCH /channels` accepts.
ModerationActions
Moderation, chat settings and the broadcast controls.
StreamActions
The live-stream side of the API: whether it is up, for how long, to how many, and the things worth capturing while it is.
RepositoryDispatcher
Reaches every method of every TwitchPHP repository from a line of chat.
Sensitive
What must never be echoed into a chat channel.
TwitchAdapter
Runs the whole catalogue from Twitch chat.
TwitchConfig
What the Twitch connector needs to start, read from the same environment the bot itself was.
TwitchConnector
Twitch, as far as the bridge is concerned.
TwitchGateway
Owns the Twitch side of the bridge: one IRC connection, the set of channels it is joined to, and a paced outbound queue.
TwitchText
The parts of turning a message into text that are Twitch's rules rather than anybody's.

Traits

UsesTelegram
Reaches the Telegram client from inside an action.
UsesTwitch
Reaches the Twitch client from inside an action.

Enums

Access
One permission ladder for permission systems that agree on nothing.
On this page

Search results