Skip to content

Instantly share code, notes, and snippets.

@webbson
webbson / telegrambot.php
Last active June 14, 2020 12:18
Telegram bot for Sonarr/Radarr
<?php
function processMessage($message) {
$groupchat = '-XXXX'; // Group chat id
// process incoming message
$message_id = $message["message_id"];
$chat_id = $message["chat"]["id"];
$response = array("chat_id" => $chat_id);
$plextoken = "YYYY"; // Plex token
$plexbaseurl = "https://ASFASFASF.plex.direct:32400"; // PLEX DIRECT URL