All Projects → php-telegram-bot → Example Bot

php-telegram-bot / Example Bot

Licence: mit
[WIP] An A-Z example of a PHP Telegram Bot.

Projects that are alternatives of or similar to Example Bot

Telegram Bot
Ruby gem for building Telegram Bot with optional Rails integration
Stars: ✭ 433 (+105.21%)
Mutual labels:  bot, telegram-bot, webhook, telegram
Node Telegram Api
A simple API to create and control Telegram bots
Stars: ✭ 117 (-44.55%)
Mutual labels:  bot, telegram-bot, telegram
Micro Bot
🤖 Zero-configuration Telegram bot runner
Stars: ✭ 173 (-18.01%)
Mutual labels:  bot, telegram-bot, telegram
Icopy
fclone telegram interface.Send commands to Telegram BOT for get a convience way to control fclone resources copy missions.
Stars: ✭ 188 (-10.9%)
Mutual labels:  bot, telegram-bot, telegram
Telebot
Write Telegram bots in Rust with Tokio and Futures
Stars: ✭ 179 (-15.17%)
Mutual labels:  bot, telegram-bot, telegram
Novagram
An Object-Oriented PHP library for Telegram Bots
Stars: ✭ 112 (-46.92%)
Mutual labels:  bot, telegram-bot, telegram
Telegrambots
Java library to create bots using Telegram Bots API
Stars: ✭ 2,728 (+1192.89%)
Mutual labels:  telegram-bot, webhook, telegram
Telegram Bot Github
Allows to you receive GitHub notifications right in the Telegram
Stars: ✭ 103 (-51.18%)
Mutual labels:  bot, telegram-bot, telegram
Tradingview Webhook Bot
⚙️ Send TradingView alerts to Telegram, Discord, Slack, Twitter and/or Email.
Stars: ✭ 135 (-36.02%)
Mutual labels:  bot, webhook, telegram
Expressbot
一个可以帮你订阅、查询快递物流、跟你闲聊Telegram机器人
Stars: ✭ 137 (-35.07%)
Mutual labels:  bot, telegram-bot, telegram
Vk To Telegram Transfer Bot
Бот, пересылающий сообщения из чатов ВК в Telegram и обратно
Stars: ✭ 143 (-32.23%)
Mutual labels:  bot, telegram-bot, telegram
Telegram Bot Api
First Telegram Bot API node.js library
Stars: ✭ 205 (-2.84%)
Mutual labels:  bot, telegram-bot, telegram
Zanzara
Asynchronous PHP Telegram Bot Framework built on top of ReactPHP
Stars: ✭ 107 (-49.29%)
Mutual labels:  bot, telegram-bot, telegram
Telegram Clonebot
Simple Bot to clone Google Drive Files (or Folders) to your Team Drive[or Normal Drive]. P.S This is not a Mirror Bot. Enjoy ✌🏻
Stars: ✭ 114 (-45.97%)
Mutual labels:  bot, telegram-bot, telegram
Hackernewsbot
📰 Telegram bot that posts new hot stories from Hacker News to telegram channel
Stars: ✭ 103 (-51.18%)
Mutual labels:  bot, telegram-bot, telegram
Botserver
http://telegram.org Bot API Webhooks Framework, for Rubyists
Stars: ✭ 125 (-40.76%)
Mutual labels:  telegram-bot, webhook, telegram
Java Telegram Bot Tutorial
Java Telegram Bot Tutorial. Feel free to submit issue if you found a mistake.
Stars: ✭ 165 (-21.8%)
Mutual labels:  bot, telegram-bot, telegram
Telebot.nim
Async client for Telegram Bot API in pure Nim [Bot API 5.1]
Stars: ✭ 93 (-55.92%)
Mutual labels:  bot, telegram-bot, telegram
Telegram Bot
Telegram Bot using AWS API Gateway and AWS Lambda
Stars: ✭ 96 (-54.5%)
Mutual labels:  bot, telegram-bot, telegram
Telegram.bot
.NET Client for Telegram Bot API
Stars: ✭ 1,964 (+830.81%)
Mutual labels:  bot, telegram-bot, telegram

PHP Telegram Bot Example

🚧 Work In Progress 🚧

An A-Z example of Telegram bot using the PHP Telegram Bot library.

This repository aims to demonstrate the usage of all the features offered by the PHP Telegram Bot library and as such contains all example commands. Also, it gives an example setup for both the standard usage and using the PHP Telegram Bot Manager

❗️ Important!

  • Most of the commands found here are not to be used exactly as they are, they are mere demonstrations of features! They are provided as-is and any extra security measures need to be added by you, the developer.
  • Before getting started with this project, make sure you have read the official readme to understand how the PHP Telegram Bot library works and what is required to run a Telegram bot.

Let's get started then! 😃

0. Cloning this repository

To start off, you can clone this repository using git:

$ git clone https://github.com/php-telegram-bot/example-bot.git

or better yet, download it as a zip file:

$ curl -o example-bot.zip https://github.com/php-telegram-bot/example-bot/archive/master.zip

Unzip the files to the root of your project folder.

1. Making it yours

Now you can choose what installation you would like, either the default one or using the Bot Manager project. Depending on which one you choose, you can delete the files that are not required.


First of all, you need to rename config.example.php to config.php and then replace all necessary values with those of your project.

Default Some of these files require extra configurations to be added. Check hook.php how they are loaded. Thanks to reading the main readme file, you should know what these files do.

  • composer.json (Describes your project and it's dependencies)
  • set.php (Used to set the webhook)
  • unset.php (Used to unset the webhook)
  • hook.php (Used for the webhook method)
  • getUpdatesCLI.php (Used for the getUpdates method)
  • cron.php (Used to execute commands via cron)

Bot Manager Using the bot manager makes life much easier, as all configuration goes into a single file, manager.php.

If you decide to use the Bot Manager, be sure to read all about it and change the require block in the composer.json file:

"require": {
    "php-telegram-bot/telegram-bot-manager": "*"
}

Then, edit the following files, replacing all necessary values with those of your project.

  • composer.json (Describes your project and it's dependencies)
  • manager.php (Used as the main entry point for everything)

Now you can install all dependencies using composer:

$ composer install

2. Adding your own commands

You can find a few example commands in the Commands folder.

Do NOT just copy all of them to your bot, but instead learn from them and only add to your bot what you need.

Adding any extra commands to your bot that you don't need can be a security risk!

To be continued!

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].