Resource for using Discord Webhooks to send messages in a Multi Theft Auto: San Andreas server. Supports simple text and Embed messages.
MTA forum topic: Link
Webhooks are a low-effort way to post messages to channels in Discord. They do not require a bot user or authentication to use.
Source: Discord Webhooks Guide
- Get the latest version: mta-discord-webhooks/releases/latest
- Extract the downloaded ZIP file
- Place the
discord_webhooks
folder in your server'sresources
directory - Use the
refresh
command in your server's console to load the resource
- Select a Discord channel in which you have the 'Manage Webhooks' permission
- Right click it then select 'Edit Channel'
- Go to the 'Integrations' tab
- Click on 'Webhooks'
- Create a webhook, customize its name and avatar
- Copy webhook URL
- Add webhook URLs by assigning names to them in config.lua
- To send a message to the webhook's channel, use the functions explained below
Access this page to view the full documentation.
Check out botder's mtasa-discord-bot Project that lets you connect a Discord Bot application to your MTA:SA server, which are more powerful than webhooks.
Found a bug? Want to suggest a feature? Feel free to open an issue in the Issues section.
Need help? Read the Support section on the MTA forum thread linked in the About section.
Feel free to contribute to the project by improving the code & documentation via Pull Requests. Thank you!