Use these modules to connect your Panel via Webhook/API.
import requests
CONFIG = {
"API_URL": "https://private-panel.arhacker.shop/api/",
"TOKEN": "PUT_YOUR_PANEL_TOKEN_HERE"
}
def send_message(chat_id, text):
url = f"{CONFIG['API_URL']}bot{CONFIG['TOKEN']}/sendMessage"
payload = {"chat_id": chat_id, "text": text}
try:
response = requests.post(url, json=payload)
print("Response:", response.json())
except Exception as e:
print("Error:", e)
# Example: Sending a message to user ID 123456
send_message(123456, "Hello from Python Script! 🚀")
const axios = require('axios');
const CONFIG = {
API_URL: "https://private-panel.arhacker.shop/api/",
TOKEN: "PUT_YOUR_PANEL_TOKEN_HERE"
};
async function sendMessage(chatId, text) {
try {
const url = `${CONFIG.API_URL}bot${CONFIG.TOKEN}/sendMessage`;
const response = await axios.post(url, {
chat_id: chatId,
text: text
});
console.log("Response:", response.data);
} catch (error) {
console.error("API Error:", error.message);
}
}
// Example: Sending a message to user ID 123456
sendMessage(123456, "Hello from Node.js! 🚀");