Skip to content

Instantly share code, notes, and snippets.

@Kyle2142
Kyle2142 / Userbot admin scripts.md
Last active July 2, 2021 11:52
Some helper scripts that might be of use, for multi-userbot, multi-group administration

All of these were created to work with multiple client situations, but you can easily pass [client] to work on one.

Note that in most cases, you will need to tweak the instructions (e.g. by adding exception handling) if the clients you run it on are not admins, or other things that happen in "less-than-perfect" situations

@Kyle2142
Kyle2142 / ocelotbot.php
Last active April 4, 2018 16:36
t.me/revolver_ocelot_bot
<?php
$IMGID = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; //image ID given to us by telegram
$content = file_get_contents("php://input"); //get json from telegram's request
$update = json_decode($content, TRUE); //decode json into assoc array
//file_put_contents('ocelotbot.log',print_r($update,true),FILE_APPEND); //log updates for debugging purposes
if(isset($update['inline_query'])){