TypeScript bot for auto-deleting of Telegram premium stickers with some interesting features based on the grammY library

Overview

anti-premium-stickers-bot

TypeScript bot for auto-deleting of Telegram premium stickers with some interesting features based on the grammY library

This bot was created as an additional tool to fight against premium Telegram stickers, the animations of which make any device shudder

Features

  • Removes premium stickers
  • Handy white/ignore lists configuration from DM
  • Locale configuration via commands
  • and more... (maybe)

Setup

Local

  1. Create a new bot and get a bot token

  2. Install redis-cli and node.js

  3. Clone this repository

  4. Create a .env file in the root of the folder and pass variables into it:

    • BOT_KEY - bot token
    • CREATOR_ID - your ID for working with the bot whitelist/ignored list from the DM
  5. Open and edit in bot.ts call for createClient from:

    const client: RedisClientType = createClient({
        url: `redis://${redisUser}:${redisPass}@${redisURL}:${redisPort}`,
    });

    to

    const client: RedisClientType = createClient();

    This function call will use your local Redis DB

  6. Run npm i and npm run local

  7. Wait for Starting bot log message

  8. Bot is ready to go!

If you want to pass environment variables on your system, all you need to do is run npm start in step 6

Heroku

  1. Create a new bot and get a bot token
  2. Create a new Redis database and get: Username, Password, Host and Port

    How to create a Redis database, create a user and get the necessary data to connect will not be written here

  3. Create a new pipeline in Heroku, the application in it and set neccessary config vars in the settings:
    • BOT_KEY - bot token
    • CREATOR_ID - your ID for working with the bot whitelist/ignored list from the DM
    • REDIS_USER - name of Redis DB user
    • REDIS_PASS - password of Redis DB user
    • REDIS_URL - endpoint of Redis DB
    • REDIS_PORT - port of Redis DB endpoint
  4. Push sources on Heroku (or set up auto-deployment) and wait for build
  5. Wait for Starting bot log message
  6. Bot is ready to go!

Note about Heroku

Go to step 3 in Heroku Docker Docs to convert the stack into a container.

If something doesn't work, check the application logs in Heroku or locally and try googling the problem. If nothing helps, open an Issue with a detailed description of the problem

Bot commands

Group commands:

  • silent - manage bot silent mode
  • help - send help message
  • silentonlocale - change message when silent mode is enabled
  • silentonlocalereset - reset message when silent mode is enabled
  • silentofflocale - change message when silent mode is disabled
  • silentofflocalereset - reset message when silent mode is disabled
  • messagelocale - change message when bot removes stickers
  • messagelocalereset - reset message when bot removes stickers

DM commands:

  • addwhitelist - add group ID to white list
  • removewhitelist - remove group ID from white list
  • getwhitelist - get all groups info from white list
  • addignorelist - add group ID to ignore list
  • removeignorelist - remove group ID from ignore list
  • getignorelist - get all groups ID from ignore list

Bot locale configuration

The entire locale is now stored in the locale.ts file. Some words can be changed for chats using the commands above with locale substring in it.

Remember to change creatorLink in locale.ts, which allows users to contact you for whitelist access

Changelog

The project now has a separate file CHANGELOG.md. Check it for details

FAQ

Q: How white/ignore lists are working?

When the bot is added to an unknown group, you will be prompted to add the group to the whitelist, decline the offer to add, or add it to the ignore list. The ignore list is used to prevent the bot from sending you information about future additions to the group that you have set to the ignore list. In the case of a simple rejection, the bot will not work in the new chat until you add it to the whitelist

Q: Why were these lists added in the first place?

During the tests, it became clear that with limited resources (small database memory, low system configuration, etc.), the best solution was to limit the number of chats, for less load on the infrastructure of the bot. If you want, whitelist can be cut out of the code, perhaps later will be created a separate branch for this, but not for sure

License

This repository is licensed under MIT License

You might also like...

Um simples bot para o Telegram que baixa vídeos e áudios do TikTok & outras funcionalidades

Kelle Estella (Telegram) Um simples bot para o Telegram que baixa vídeos e áudios do TikTok & outras funcionalidades. Clique aqui para utilizá-lo. Com

Apr 20, 2022

Telegram & Discord chat bot for Airline Manager 4

AM4 Bot AM4 Bot was a Discord & Telegram chat bot used in 63 servers and across several Telegram chats between 2020-2022 for the game Airline Manager

Jun 5, 2022

Telegram bot with a graphical interface that enables you to schedule messages and generate automatic replies 🤖

Telegram bot with a graphical interface that enables you to schedule messages and generate automatic replies 🤖

Telegram bot with a graphical interface that enables you to schedule messages and generate automatic replies 🤖

Dec 6, 2022

Telegram voice recognition bot

Node.js bot for telegram messenger based on Microsoft Azure Speech Service and Node.js Telegram Bot API

Mar 9, 2022

a Node.js boilerplate to start creating your telegram bot without too much configuration at the beginning

node-telegram-bot-starter-pack How to use clone the repo run npm install run cp .env.example .env and replace the variables with your data define your

Sep 7, 2022

Telegram bot for Youtube-dl

Telegram bot for Youtube-dl

English youtube-dl download telegram bot ydls와 함께 사용할 수 있는 봇으로, Docker가 설치되는 곳이면 어디든 설치가 가능하다 (ex: 리눅스 서버, 시놀로지 나스) 기존에 ydls 이미지를 그대로 사용하였지만, 채널 이름과,

Oct 19, 2022

A telegram bot that sends the current day's foreign exchange rates to its subscribers

Birr Forex Bot A bot that sends the current day's foreign exchange rates to its subscribers. Using the bot Check out the bot here. Running the bot It

Dec 21, 2022

Laporan keuangan, pencatatan pengeluaran dengan Bot Telegram yang terintegrasi dengan Google Spreadsheet

Laporan keuangan, pencatatan pengeluaran dengan Bot Telegram yang terintegrasi dengan Google Spreadsheet

laporan-keuangan-bot Laporan keuangan, pencatatan pengeluaran dengan Bot Telegram yang terintegrasi dengan Google Spreadsheet Mulai Buat Bot telegram

Dec 19, 2022

New base bot WhatsApp 🈴 bukan self bot lagi atau buka bot yang bisa di pakai oleh bot sendiri 😎

New base bot WhatsApp 🈴 bukan self bot lagi atau buka bot yang bisa di pakai oleh bot sendiri 😎

Installation • Thanks to • Donate Official Group Bot • Settings Instalasi Heroku Buildpack Click the deploy icon below ! heroku/nodejs https://g

Feb 9, 2022
Owner
Владислав
Tinkering with Python, JS (TS)
Владислав
It is a discord bot bot which can play lofi song in different language 24/7. It has premium system and cool embed looks with buttons. It can play youtube songs, playlists. This bot code was made by Supreme#2401. It uses djs V12

Lofi-Radio-Music-Bot It is a discord bot bot which can play lofi song in different language 24/7. It has premium system and cool embed looks with butt

Diwas Atreya 89 Jan 2, 2023
Adds links to Discogs pages from various sites. Auto search for music on torrent and other sites. Does multi auto-search on Artist/Discography pages. Auto search local HDDs/filelists using Voidtools Everything search engine.

Discogs Scout: Adds links to Discogs pages from various sites. Auto search for music on torrent and other sites. Does multi auto-search on Artist/Disc

null 27 Dec 27, 2022
auto create and auto verif otp vconomics ! udah coid awkaowkaw

Vconomics Refferal Bot How to use : git clone https://github.com/dkmpostor/vconomics/ cd vconomics npm install node index.js Input refferal code Done

DK 2 Jan 10, 2022
Bot sviluppato in Node.js che permette la prenotazione e il successivo invio dello screenshot di quest'ultima tramite un bot di telegram.

Unimore-Bot Bot sviluppato in Node.js che permette la prenotazione e il successivo invio dello screenshot di quest'ultima tramite un bot di telegram I

Lorenzo Codeluppi 8 Jun 9, 2022
Weblookup Telegram bot - The usefully bot like check website, screenshot

Weblookup Telegram bot - The usefully bot like check website, screenshot

Fusedev 3 May 9, 2022
A typescript telegram bot with just two works in mind.

Minitsbot aka @Akagiprobot Made in ❤️ with Grammy and deno. A typescript telegram bot with just two works in mind: Autoapproves new join requests. (Ch

Divide Projects 3 Jun 7, 2022
A multipurpose bot, a clan bot, a all in one bot. The one bot u need for ur server originally made as Milrato discord Bot and by Tomato6966.

Public Bot and Support Server! Invite the Public Version of this Bot so you don't need to host it by yourself or join my Discord server to get a custo

Tomato6966 472 Dec 25, 2022
Telegram-API Library Written in TypeScript

TeleLib a node js Telegram Wrapper written in TypeScript. installation yarn add @telelib/telelib or npm i --save @telelib/telelib how to use create a

MohammadMahdi Afshar 0 Jul 27, 2022
⚡ Discord bot with economy, gambling, music, fun, moderation features based on discord.js v12

Crucian Crucian is my discord bot with simple structure based on discord.js Click Here to invite Crucian to your server Author Crucian © Apoo Authored

apoow3b 3 Jul 26, 2021
Cem Karaca - Telegram Bot

Cem Karaca Telegram botu | Bot Cem Karaca şarkılarını tanıtmak için yapıldı. Bot: https://t.me/cem_karaca_bot Botun kullanımı: /start - Botu başlat /h

Lucifer25x 1 Jan 10, 2022