pwdz / TelegramBotChannel_CE97

A bot that acts as an admin in a channel and sends the received messages from users to real admins!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intro

This is a Telegram bot that is used as an admin of a channel.
When a user starts a chat with the bot, bot sends messages to a private channel that all the admins of channel are there.
So admins can see messages without being in chat with user directly and can send answers to users. There is also a java Logger that saves messages to a file.
Bot id: @CE97_Adminbot

Format of the PM's

@username
firstname lastname
Thu Jan 16 15:00:00 EST 2020
[PM]:
message πŸ˜‚ message πŸ˜† message 😱
message message message 😢.

Usage

  1. Create a bot using BotFather.
  2. Add your bot to your channel and give it administrator permissions.
  3. Clone project and import it using Maven.
  4. In class Main replace myBotUsername myBotToken myChatId.(chatId is your channels id)
botsApi.registerBot(new MyBot("myBotUsername","myBotToken","myChatId"));

Run the program! :)

Resources

Bots: An introduction for developers
Telegram Bot API
Sending a message to a Telegram channel

Yet to come

  • Ability of answering users using the bot and inline queries
  • Sending stickers, images, Gifs and ... via bot
  • Alerting when a message is edited by user
  • Deleting a message that a user has deleted in chat with bot

About

A bot that acts as an admin in a channel and sends the received messages from users to real admins!


Languages

Language:Java 100.0%