a simple api, which allows to send webhooks to a specific discord channel, through a proxy, since samp does not support https. it was developed for use in Astro Roleplay (besta samp server).
-
Clone repository
git clone https://github.com/vendder5/samp-webhooks-api.git -
Navigate to the repository directory
cd samp-webhooks-api -
Create a virtual env
Linux:
python3 -m venv venvWindows:
virtualenv venv -
Access the virtual environment
Linux:
source venv/bin/activateWindows:
.\venv\Scripts\activate -
Install dependencies
pip install -r requirements.txt -
Run api
Linux:
python3 app.pyWindows:
py app.py
// Webhooks
Discord_SendWebhookMessage(const message[], const webhook_username[] = "samp-webhooks");
Discord_SendWebhookEmbed(const title[], const description[], const color[], const webhook_username[] = "samp-webhooks");#include <a_samp>
#include <samp-discord-api>
main(){ return 0; }
public OnGameModeInit()
{
Discord_SendWebhookEmbed("Server was started", "the server has been successfully started", .webhook_username = "test webhook");
return 1;
}