feat(v1.5.0): Full-Stack Web Engine, F-Strings, Cyber OSINT & Terminal UI Suite
This commit is contained in:
1 parent
619492bdbf
commit
f90ea8cdd1
13 files changed
+766
-26
No files matched your search
@@ -0,0 +1,27 @@
|
||||
# 🤖 AiraLang Module: `bot`
|
||||
|
||||
The `bot` module provides 1-line notification and messaging integrations for Telegram and Discord bots.
|
||||
|
||||
---
|
||||
|
||||
## 📌 Functions
|
||||
|
||||
### 1. `bot.telegram_send(bot_token, chat_id, message, parse_mode="HTML")`
|
||||
Sends a message via the official Telegram Bot API.
|
||||
```airalang
|
||||
import "bot";
|
||||
|
||||
let token = "123456:ABC-DEF...";
|
||||
let chat = "987654321";
|
||||
bot.telegram_send(token, chat, "<b>AiraLang Alert:</b> Port scan finished!");
|
||||
```
|
||||
|
||||
### 2. `bot.discord_send(webhook_url, content, username="Aira Bot", avatar_url=null)`
|
||||
Dispatches an alert to a Discord channel via incoming webhook.
|
||||
```airalang
|
||||
bot.discord_send(
|
||||
"https://discord.com/api/webhooks/...",
|
||||
"Deployment completed on Vercel! 🚀",
|
||||
username="Aira CI/CD"
|
||||
);
|
||||
```
|
||||
Reference in new issue
Block a user