Webhooks
Create a webhook in a channel and send messages through it under a name and avatar you choose.
A webhook is a channel's own posting slot: a message sent through it arrives under any name and avatar
you pick, like "Server News" instead of Righteous. ,webhooks creates one and sends
embed codes through it. Every subcommand needs Manage Server and
Manage Webhooks from you and Manage Webhooks from the bot. None of it is premium.
,log webhook is a separate setting with a webhook of its
own. The two never share one. See Logging.
Create a webhook
,webhooks create makes it in the channel you run
it in, and every message sent through it lands there.
Syntax
,webhooks create <name>
Example
,webhooks create Server News
The name can have spaces; the first 25 characters are kept, and Discord refuses the word "discord" or
a sixteenth webhook in one channel (nothing is created). It starts with your server icon as its
avatar. Copy the identifier in the reply: send, edit and delete all need it.
The channel is recorded once. If someone moves the webhook in Discord's Integrations settings,
sends follow it but list keeps the old channel.
Find a lost identifier
The identifier is the webhook's Discord ID, a long run of digits, not its name.
Syntax
,webhooks list
,webhooks list shows every webhook this command
made here (identifier, channel, creator), ten to a page. One you made in Discord's own settings, or
another bot's, isn't listed and can't be driven from here.
Send a message through it
,webhooks send takes the identifier and an embed
code. Plain text works as itself.
Syntax
,webhooks send <identifier> <code>
Example
,webhooks send 1234567890123456789 {color: #fb4868}$p{title: Maintenance tonight}$p{description: The server goes quiet at 22:00 and comes back within the hour.}$p{footer: {guild.name} && {guild.icon}}$p{button: Status page && https://example.com/status}Maintenance tonight
The server goes quiet at 22:00 and comes back within the hour.
Righteous
The message posts in the webhook's channel, not necessarily where you typed. The bot reacts to your
command with a checkmark instead of replying. Variables fill in from you: {user} is whoever ran
the command and {channel.name} is the channel you ran it in, so write announcements, not greetings.
{guild.name} and {guild.icon} are the safe pair.
To clear the message later, end the code with ++delete <seconds> (whole seconds, 1 to 600, at the
very end; a larger number is dropped with the flag and the message stays):
Syntax
,webhooks send <identifier> <code> ++delete <seconds>
Example
,webhooks send 1234567890123456789 {content: Voice chat is open, come say hello.} ++delete 600Voice chat is open, come say hello.
A {v2:} code is refused
A webhook can only send classic embeds and link buttons. Use {title:}, {description:} and
{field:}, or post with ,customembed.
Only link buttons survive the send
A webhook can't send a colored button. The bot resends the message without any buttons: your text
and embed arrive, the buttons quietly don't. {button: Label && https://example.com} always goes
through.
Change the name and avatar
,webhooks edit changes what your members see. Both
settings are read on every send, so a change applies to the next message.
Syntax
,webhooks edit <identifier> <name|pfp> <set|reset> [value]
Example
,webhooks edit 1234567890123456789 name set Server News
| Setting | Accepts | After reset |
|---|---|---|
name set <name> | text, first 25 characters kept | your server's name |
pfp set <image> | an image attached to the command, or one https link | your server's icon |
pfp also answers to profile and icon, name to username. On slash only the link works,
because /webhooks edit can't receive a file.
Delete a webhook
,webhooks delete removes it on Discord and drops
the stored entry. Messages it already sent stay.
Syntax
,webhooks delete <identifier>
Example
,webhooks delete 1234567890123456789
If the channel or webhook was deleted in Discord, Righteous isn't told: run delete anyway to clear
the entry. The reply says which of the two it found.
Common issues
,webhooks alone did nothing. It's a set of subcommands: create, list, send, edit,
delete. Each also has a slash form, and /webhooks send collects the code in a pop-up.
It says the webhook is invalid. Wrong identifier, or a webhook this command didn't make. Copy the
digits from ,webhooks list.
It says the embed is invalid. Your code rendered nothing Discord accepts, usually every tag
misspelled. Send a bare {description: test} and build back up.
It reports an error sending. The webhook probably no longer exists (removed from Integrations
or its channel deleted): create a new one. If a fresh one fails too, Discord rejected the code's
content, such as a {description:} over 4096 characters or an unreachable {image:}.
It posted in the wrong channel. It posts in the webhook's own channel. ,webhooks can't move it,
so check Integrations or make a second webhook.
My buttons never showed up. Only link buttons go through a webhook. Give the button a URL.
pfp set keeps asking for an image. It wants an attached image or one https link with nothing
after it, not a filename or an http link.
It posts under the server's name. No name is set, or it was reset. Use name set.