All Projects → davtur19 → Turibot

davtur19 / Turibot

Licence: agpl-3.0
TuriBot is a simple way to communicate with Telegram APIs in PHP

Projects that are alternatives of or similar to Turibot

Groupbutler
This bot can help you in managing your group with rules, anti-flood, description, custom triggers, and much more!
Stars: ✭ 399 (+486.76%)
Mutual labels:  telegram-api, bot, telegram-bot, telegram
Tgbot Cpp
C++ library for Telegram bot API
Stars: ✭ 439 (+545.59%)
Mutual labels:  telegram-api, bot, telegram-bot, telegram
Informer
A Telegram Mass Surveillance Bot in Python
Stars: ✭ 745 (+995.59%)
Mutual labels:  telegram-api, bot, telegram-bot, telegram
Node Telegram Api
A simple API to create and control Telegram bots
Stars: ✭ 117 (+72.06%)
Mutual labels:  telegram-api, bot, telegram-bot, telegram
Mypackbot
🤖 Your own unlimited pack of Telegram-stickers
Stars: ✭ 18 (-73.53%)
Mutual labels:  telegram-api, bot, telegram-bot, telegram
Micro Bot
🤖 Zero-configuration Telegram bot runner
Stars: ✭ 173 (+154.41%)
Mutual labels:  telegram-api, bot, telegram-bot, telegram
Novagram
An Object-Oriented PHP library for Telegram Bots
Stars: ✭ 112 (+64.71%)
Mutual labels:  telegram-api, bot, telegram-bot, telegram
Telegram Bot Api
First Telegram Bot API node.js library
Stars: ✭ 205 (+201.47%)
Mutual labels:  telegram-api, bot, telegram-bot, telegram
Java Telegram Bot Api
Telegram Bot API for Java
Stars: ✭ 819 (+1104.41%)
Mutual labels:  telegram-api, bot, telegram-bot, telegram
Nikoro
A plugin-based, all-in-one, Telegram Bot written in Node.js
Stars: ✭ 51 (-25%)
Mutual labels:  bot, telegram-bot, telegram
Telepyth
Telegram notification with IPython magics.
Stars: ✭ 54 (-20.59%)
Mutual labels:  bot, telegram-bot, telegram
Drone Telegram
Drone plugin for sending Telegram notifications
Stars: ✭ 67 (-1.47%)
Mutual labels:  telegram-api, telegram-bot, telegram
Telegram Api
Complete async capable Telegram bot API implementation for PHP7
Stars: ✭ 650 (+855.88%)
Mutual labels:  telegram-api, telegram-bot, telegram
Mtproto
Full-native go implementation of Telegram API
Stars: ✭ 566 (+732.35%)
Mutual labels:  telegram-api, telegram-bot, telegram
Bot Telegram
Exemplo de como criar um BOT para o melhor app de mensagens do mundo: Telegram.
Stars: ✭ 53 (-22.06%)
Mutual labels:  bot, telegram-bot, telegram
Telegraf
Modern Telegram Bot Framework for Node.js
Stars: ✭ 5,178 (+7514.71%)
Mutual labels:  bot, telegram-bot, telegram
Pockebot
Read It Later for Telegram
Stars: ✭ 56 (-17.65%)
Mutual labels:  bot, telegram-bot, telegram
Zabbix In Telegram
Zabbix Notifications with graphs in Telegram
Stars: ✭ 710 (+944.12%)
Mutual labels:  bot, telegram-bot, telegram
Marvin
The paranoid bot (framework)
Stars: ✭ 51 (-25%)
Mutual labels:  bot, telegram-bot, telegram
Pytelbot
A playful bot in telegram
Stars: ✭ 12 (-82.35%)
Mutual labels:  bot, telegram-bot, telegram

TuriBot

TuriBot is a simple way to communicate with Telegram APIs in PHP

Latest Stable Version Total Downloads License

Requirements

PHP 7.1 or higher with curl extension

Installation

composer require davtur19/turibot

Webhook

Setup recommended: open setupWebhook.php in your browser and follow the setup wizard.

Manual setup: set webhook to the file webhook.php, and as parameter GET "api" set your token.

Example for manual setup:

curl https://api.telegram.org/botTOKEN/setWebhook?url=https://WEBSITE/DIR/webhook.php?api=TOKEN

Alternatively if you don't want to use GET, just change this piece of code.

GetUpdates

Setup Token

Usage

  • Look at the examples (webhook.php and getUpdates.php), it's very simple if you know PHP and OOP
  • All methods have the parameters in the same order as the BotAPIs
  • The reply_markup, permissions, commands, entities and parameters that require arrays, already have a json_encode in the functions, you just need to pass arrays

Security

https://github.com/php-telegram-bot/core/wiki/Securing-&-Hardening-your-Telegram-Bot

Custom endpoint

With the Bot API 5.0 it is now possible to self host your own Bot API, here is an example of how to add your own endpoint

//token, json_payload, endpoint
$client = new Client("1234:AAbbccdd", false, "http://endpoint/bot");

Json payload

Only works with webhooks, for more info: https://core.telegram.org/bots/faq#how-can-i-make-requests-in-response-to-updates

I do not recommend using it as it may need a particular configuration to the webserver for flushing and you cannot get a response from the Bot API

Generator

https://github.com/davtur19/TuriBotGen

Contributors

Old version

I don't recommend its use, but it could be useful for those unfamiliar with OOP and would like to start learning how PHP and Telegram Bot Api work.

https://github.com/davtur19/TuriBot/tree/old

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].