Skip to content

triipme/telegram-ico-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Bot for ICO purpose

This is a special-purpose Bot for processing messages in Telegram Group/Super Group within ICO context. The goal is to fight potential scammers by:

  • Make it harder to get members' usernames in the group
  • Ban any links (or blacklisted links) being posted on discussion group

The button below makes it super easy to get started by deploying on Heroku free dyno:

Deploy

This initial codebase was written in a night, probably CUI, so feel free to contribute and make this rudimentary Bot much better.

Let's fight scammers together!

Made for ico.triip.me by Kent Nguyen


Bot In action

Join

Ban


Current features

  • Delete member joined/left event notification.
  • Whitelist users by username, these users can post anything.
  • Do not allow new member to chat for X minutes.
  • Detect any URL links, and ban users for X minutes.
  • Detect vulgar words, and ban users for X minutes.
  • Store users on Firebase database when joined/left, as Telegram does not have this API to get data.

Wishlist (help, please!)

  • Auto PM new member with a template message.
  • Auto post periodically.
  • Improve error-handling.
  • Unit tests LOL!

Technical

  • Deployed on Heroku
  • Ruby 2.5 with Sinatra framework
  • HTTPS Webhook called by Telegram
  • Auto set webhook by GET /webhook with proper host on browser

File structure

All logics are contained within these files:

app.rb
config/helpers.rb

The rest are miscellaneous framework files necessary for running on Heroku.


Setup local development environment

  • Change values in .env file.
  • Follow instructions in config/firebase.json to config link with Firebase.
  • Start server with ruby app.rb.
  • User local tunneling such as ngrok to create a public URL.
  • Load /webhook in browser with public path (must be HTTPS).

About

Telegram bot helper for ICO, fighting against scammers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published