Configuration: Discord Webhooks

Configuration: Discord Webhooks

Discord Webhooks

  1. Navigate to \resources\[htn-core]\htn-framework\server\logs\sv_webhooks.lua and configure all the Discord webhooks you want to use.

Generating Discord Webhook URLs

Follow these steps to create webhook URLs in Discord:

  1. Open Discord: Log in to your Discord account and go to the server where you want to add a webhook.
  2. Access Channel Settings: Right-click on the text channel where you want the webhook to send messages and select Edit Channel.
  3. Go to Integrations: In the channel settings, click on Integrations in the left sidebar.
  4. Create Webhook: Click the Create Webhook button. If you don’t see this option, ensure you have the Manage Webhooks permission enabled for your role.
  5. Configure Webhook: Give the webhook a name, choose the channel (if not already selected), and optionally set a custom avatar. Click Copy Webhook URL to copy the URL to your clipboard.
  6. Paste Webhook URL: Return to the \resources\[htn-core]\htn-framework\server\logs\sv_webhooks.lua file and paste the webhook URL in the appropriate configuration section.
  7. Save and Test: Save the configuration file. To verify, trigger an event in your framework that uses the webhook (e.g., a log event) and check if a message appears in the designated Discord channel.
  8. Repeat for Additional Webhooks: If you need multiple webhooks for different purposes (e.g., logs, alerts), repeat the process for each channel or webhook.