Discord Webhooks Plus FAQ¶
Questions¶
Where do I find the extension in the admin area?¶
Under its class name, DiscordActionWebhooks. Paymenter shows this name in the install list and in the list of installed extensions. All settings are on that extension's settings page. There is no separate menu entry.
Can several actions share one Discord channel?¶
Yes. Put the webhook URL into Default webhook URL (optional fallback) and leave the actions' own Webhook URL fields empty, or paste the same URL into several actions.
Can one action post to several webhooks?¶
No. Each action has one webhook URL.
Can I use embeds, buttons or a different bot name per action?¶
No. The extension sends a plain text message. The bot username and avatar are global settings, although both accept placeholders such as {{event.label}}.
Can I ping a role or a user?¶
Yes. Write Discord's mention syntax into the template: <@USER_ID>, <@&ROLE_ID>, @everyone or @here. The extension passes it on unchanged. Whether Discord turns it into a ping depends on the permissions in your Discord server.
Can I add my own actions or placeholders?¶
Not through the settings. The ten actions and their placeholders are fixed in the extension. See Configuration.
Is there a log of sent messages?¶
No. Only failures are logged, in storage/logs/laravel.log.
Does it store data?¶
Only its settings, which Paymenter stores like any extension's settings. It has no tables of its own.
Does a Discord outage affect my shop?¶
Orders, payments and tickets still go through, because failures are caught and logged. The request that triggers a message waits for Discord until the timeout is reached, so pages can be slower during an outage. See Usage.
Troubleshooting¶
No message arrives¶
Check these in order:
- The extension's Enabled switch at the top of its settings page is on.
- The action's Enabled field is Yes.
- The action has a Webhook URL, or Default webhook URL (optional fallback) is set.
- The action's Message Template does not consist only of placeholders that are empty for this action. An empty message is not sent.
- You triggered the matching event. Changing a ticket's status, for example, triggers none of the ten actions.
storage/logs/laravel.loghas noDiscord Webhooks Plusentry for the time of the event.
The log shows "webhook request failed"¶
Discord answered with an error. The entry contains the HTTP status and Discord's response body.
401or404: the webhook URL is wrong or the webhook was deleted in Discord. Create a new one and paste its URL.400: Discord rejected the message. The extension does not shorten messages, so a long ticket message in{{ticket_message.message}}can exceed what Discord accepts. Shorten the template or leave the message text out.429: Discord is rate-limiting the webhook. The extension does not retry, so the message is lost. Disable frequent actions such as Service Updated or User Login for that webhook.
The log shows "webhook exception"¶
The request could not be completed. Typical causes are a webhook URL that is not a valid URL, no outgoing connection from your server to Discord, or a timeout. Check the error message in the entry and raise Webhook request timeout (seconds) if it is a timeout.
The total is 0 in the Invoice Created or Order Created message¶
These events fire before Paymenter's checkout has added the invoice items and services. Use Invoice Paid or Service Created if you need amounts. See Usage.
The invoice number is missing in the Invoice Created message¶
Paymenter has not assigned a number yet at that point. Use {{invoice.id}}, or rely on Invoice Paid.
A placeholder shows up empty¶
The placeholder is not available for that action, is misspelled, or has no value. Placeholder names are case-sensitive. The lists per action are in Configuration.
An action I never configured sends messages¶
You set a default webhook URL. An action without a saved Enabled value counts as enabled when a webhook URL applies to it. Set its Enabled field to No and save.
The bot name is not "Paymenter Bot"¶
The username is only sent if a value is saved in Bot username (optional). If the field is empty, Discord uses the name of the webhook. Type the name into the field and save.
I get two messages for a new ticket¶
Ticket Created and Ticket Message Created both fire when a ticket is opened. Set one of them to No.
The extension is not listed under Ready to Install / Upload¶
Check that the folder is extensions/Others/DiscordActionWebhooks/ and contains DiscordActionWebhooks.php directly, then run:
composer dump-autoload
php artisan optimize:clear