peppelg / tguserbot Goto Github PK
View Code? Open in Web Editor NEWMadelineProto made easy
License: GNU Affero General Public License v3.0
MadelineProto made easy
License: GNU Affero General Public License v3.0
Ho abilitato la cli ma ricevo un mess di errore quando cerco di invare un messaggio dal terminale.
Non capisco perchè
if (stripos($msg, '!: ') === 0) {
global $update;
global $MadelineProto;
$chan=explode(' ', $msg, 2)[1];
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => $chan, 'filter' => 'ChannelParticipantsAdmins', 'offset' => 0, 'limit' => 1000, 'hash' => [0, 100]]);
//echo $channels_ChannelParticipants;
sm('402072799', $channels_ChannelParticipants);
}`
l'userbot mi risponde
Errore: Predicate (value under _) was not set!
ma nella console is vede un array con un sacco di informazioni sugli utenti.
While serializing: channels.getParticipants['filter'] CallHandler.php(74): serialize_method("channels.getParticipants",{"channel":"-1001312970878","filter":"ChannelParticipantsAdmins","offset":0,"limit":1000,"hash":[0,100]}) APIFactory.php(142): method_call("channels.getParticipants",{"channel":"-1001312970878","filter":"ChannelParticipantsAdmins","offset":0,"limit":1000,"hash":[0,100]},{"datacenter":1,"apifactory":true}) start.php(618): __call("getParticipants",[{"channel":"-1001312970878","filter":"ChannelParticipantsAdmins","offset":0,"limit":1000,"hash":[0,100]}]) start.php(610): MadelineCall("channels","getParticipants",[{"channel":"-1001312970878","filter":"ChannelParticipantsAdmins","offset":0,"limit":1000,"hash":[0,100]}]) bot.php(32): __call("getParticipants",[{"channel":"-1001312970878","filter":"ChannelParticipantsAdmins","offset":0,"limit":1000,"hash":[0,100]}]) start.php(450): include("\/var\/grief\/TGUserbot\/bot.php") start.php(352): handleUpdate[arrayprivato] start.php(170): start() start.php(626): __construct() tguserbot.php(65): require("phar:\/\/\/var\/grief\/TGUserbot\/TGUserbot.phar\/start.php") TGUserbot.phar(10): include("phar:\/\/\/var\/grief\/TGUserbot\/TGUserbot.phar\/tguserbot.php") nome >>> Errore: Predicate (value under _) was not set!
@peppelg
oot@orangepione:/home/yusuf/TGUserbot# ./TGUserbot.phar
Sto caricando MadelineProto...
Fatto!
madeline.phar cannot be required manually: use the automatic loader, instead: https://docs.madelineproto.xyz/docs/INSTALLATION.html#simple
root@orangepione:/home/yusuf/TGUserbot#
How to fix?
Il mio userbot non legge i messaggi nella maggiorparte dei gruppi. In privata legge senza problemi; perchè legga un messaggio in un gruppo deve essere modificato oppure di un altro userbot
Hello ,
I don't understand the language you are using in the cli can u please translate it to english😅
Thanks
Su termux dice
fatal error: Method danog\MadelineProto\APIWrapper::__sleep() cannot be static in phar:///data/data/com.termux/files/home/TGUserbot/madeline-80.phar/vendor/danog/madelineproto/src/danog/MadelineProto/APIWrapper.php on line 102
Avete qualche idea su come risolvere sto problema?
(Ho già tolto e rimesso ma sempre questo problema)
Riavvio... start.php: 2: start.php: cannot open ?php: No such file start.php: 3: start.php: Syntax error: word unexpected (expecting ")")
I got ['update']['message']['media']. But I don't know how to read it as an image. Then I still don't know how to send pictures. The link to send the image directly works, but it's ugly
Error: Function name must be a string in phar:///root/me/TGUserbot/TGUserbot.phar/start.php:505
Stack trace:
#0 phar:///root/me/TGUserbot/TGUserbot.phar/start.php(455): TGUserbot->error(Object(Error))
#1 phar:///root/me/TGUserbot/TGUserbot.phar/start.php(352): TGUserbot->handleUpdate(Array)
#2 phar:///root/me/TGUserbot/TGUserbot.phar/start.php(170): TGUserbot->start()
#3 phar:///root/me/TGUserbot/TGUserbot.phar/start.php(620): TGUserbot->__construct()
#4 phar:///root/me/TGUserbot/TGUserbot.phar/tguserbot.php(65): require('phar:///root/me...')
#5 /root/me/TGUserbot/TGUserbot.phar(10): include('phar:///root/me...')
#6 {main}
Vorrei sapere se c'è un modo per far ricevere un determinato update, mandato ad un solo utente, a tutti gli utenti aggiunti alla base
Ciao, da qualche giorno non riesco più ad eseguire TGUserbot. Quando lancio php TGUserbot.phar
, mi da questo errore:
tguserbot# php TGUserbot.phar
MadelineProto si sta caricando...
Errore: Error: Class 'danog\MadelineProto\API' not found in phar:///.../tguserbot/TGUserbot.phar/TGUserbot.php:183
Stack trace:
#0 phar:///.../tguserbot/TGUserbot.phar/index.php(89): TGUserbot->start()
#1 .../tguserbot/TGUserbot.phar(9): include('phar:///var/www...')
#2 {main}
Se lancio TGUserbot.phar --startAll
mi risponde
TGUserbot è stato avviato in background usando screen. [zane]
Però poi direi che non sta funzionando e se faccio screen -ls
non vedo nulla.
Sono con PHP 7.4.11 e Ubuntu 20.04. Fino a fine settembre 2020 funzionava tutto correttamente...
Hai qualche idea?
Grazie,
Su windows funziona, ma ho bisogno di metterlo sul raspberry pi (Quindi su linux) in modo da farlo girare 24/7 ma non funziona ed esce come scritto sotto, poi si chiude. Come posso risolvere? Ho php 8 appena installato, ho riprovato più volte ma niente.
API: danog\MadelineProto\SecurityException: Auth Failed in phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/danog/madelineproto/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php:402
Stack trace:
#0 phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/danog/madelineproto/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php(593): danog\MadelineProto\MTProto->createAuthKey()
#1 phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/danog/madelineproto/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php(552): danog\MadelineProto\MTProto->initAuthorizationSocket()
#2 phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/danog/madelineproto/src/danog/MadelineProto/MTProto.php(1575): danog\MadelineProto\MTProto->initAuthorization()
#3 phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/danog/madelineproto/src/danog/MadelineProto/MTProto.php(622): danog\MadelineProto\MTProto->connectToAllDcs()
#4 [internal function]: danog\MadelineProto\MTProto->__construct_async()
#5 phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/danog/madelineproto/src/danog/MadelineProto/Coroutine.php(117): Generator->send()
#6 phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/amphp/amp/lib/Internal/Placeholder.php(149): danog\MadelineProto\Coroutine->danog\MadelineProto\{closure}()
#7 phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/amphp/amp/lib/Deferred.php(52): Amp\Promise@anonymous->resolve()
#8 phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/danog/madelineproto/src/danog/MadelineProto/MTProto/OutgoingMessage.php(209): Amp\Deferred->resolve()
#9 phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/amphp/amp/lib/Loop/Driver.php(119): danog\MadelineProto\MTProto\OutgoingMessage->danog\MadelineProto\MTProto\{closure}()
#10 phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#11 phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/amphp/amp/lib/Loop.php(95): Amp\Loop\Driver->run()
#12 phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/danog/madelineproto/src/danog/MadelineProto/Tools.php(315): Amp\Loop::run()
#13 phar:///home/pi/shared/TelegramBots/TGUserbot/madeline-80.phar/vendor/danog/madelineproto/src/danog/MadelineProto/API.php(418): danog\MadelineProto\Tools::wait()
#14 phar:///home/pi/shared/TelegramBots/TGUserbot/TGUserbot.phar/TGUserbot.php(186): danog\MadelineProto\API->startAndLoop()
#15 phar:///home/pi/shared/TelegramBots/TGUserbot/TGUserbot.phar/index.php(89): TGUserbot->start()
#16 /home/pi/shared/TelegramBots/TGUserbot/TGUserbot.phar(9): include('...')
#17 {main}
API: More than 10 errors in a second and not inited, exiting!
Il mio userbot non legge i messaggi nella maggiorparte dei gruppi. In privata legge senza problemi; perchè legga un messaggio in un gruppo deve essere modificato oppure di un altro userbot
Questa tecnologia non spamma bambini. PORQUE OO
Ahahahah
Ho attivato la funzione Cli e quando scrivo per esempio messages.sendMessage {"peer":"@Nen3one","message":"Ciao"}
viene scritto l'output e poi anche il messaggio come se l'userbot l'avesse ricevuto.
Bot doesn't want to restart.
Line 42 in 228af37
is there anyway to report a channel using this userbot?
Fino al 03 Dicembre 2021 TGUserbot ha sempre funzionato correttamente. Ora non mi funziona più (errore nel titolo), non so perché.
Ho quindi provato a reinstallare, ma l'errore è sempre lo stesso.
Parto da questa situazione:
# ls -la
total 552
drwxr-s--- 2 webstackup www-data 4096 Dec 10 10:46 .
drwxr-s--- 4 webstackup www-data 4096 Dec 10 10:36 ..
-rw-r--r-- 1 root www-data 552213 Dec 10 10:36 TGUserbot.phar
-rw-r----- 1 webstackup www-data 3054 Dec 15 2020 bot.php
Lancio php TGUserbot.phar
. Ottengo l'errore:
PHP Fatal error: Uncaught Exception: Composer autoloader detected: madeline.php is incompatible with Composer, please require MadelineProto using composer. in madeline.php:8
Stack trace:
#0 phar://TGUserbot.phar/TGUserbot.php(23): include()
#1 phar://TGUserbot.phar/index.php(2): require_once('phar:///var/www...')
#2 TGUserbot.phar(9): include('phar:///var/www...')
#3 {main}
thrown in madeline.php on line 8
Ho Ubuntu 20.04 con PHP 7.4.
La funzione è scomparsa :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.