tekook / telegramlibrary Goto Github PK
View Code? Open in Web Editor NEWPHP Library for the new Telegram Bot API
License: MIT License
PHP Library for the new Telegram Bot API
License: MIT License
Hey!
Thanks for the library.
When i try to run your sample code and add my URL to Telegram via Webhook the Bot never stops sending messages to the account.
Am I missing something here?
Hi
Sorry,I have a question about your project(telegram).
Can I get the message channels that I'm not their admin?
I want write a script that read message from other chanel and write to
my chanel.
I can do it?
best regards
thanks
Good afternoon.
Thank you for your library.
There are problems with sending files.
In uploadFile better to use "new \ CurlFile ($ fileName)" than the "@" in the latest version of php.
But the main problem is that in "call" in curl_options without like CURLOPT_INFILESIZE => filesize ($ arguments ['photo']), does not want to work properly download files more than a few kb.
It took me a couple of days to understand the cause of the error. I think it will help someone.
hi
i give this error
Class 'Tekook\TelegramLibrary\TelegramBotApi' not found in
Hi, I tested the project on wamp but got this error
I'm using the below example in my index.php file:
<?php
function __autoload($class_name) {
include $class_name . '.php';
}
use Tekook\TelegramLibrary;
$telegram = new TelegramLibrary\TelegramBotApi("119258014:AAFP2QbPBazeulQrRvxLJyVd-jHLrRElByw");
$eventHandler = $telegram->getEventHandler();
$eventHandler->addHook(TelegramLibrary\Events::TEXT,
function(\Tekook\TelegramLibrary\Types\Message $message) {
if ($message->getText() == "A") {
$message->reply("OK", ["reply_markup" => new TelegramLibrary\Markups\ReplyKeyboardHide()]);
} else {
$message->reply("Hello, " . $message->getFrom()->getFirstName() . " please answer A!",
[
"reply_markup" => new TelegramLibrary\Markups\ReplyKeyboardMarkup([
["A", "B"],
["C", "D"],
["E", "F"],
])
]);
}
});
$telegram->pushUpdate();
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.