Coder Social home page Coder Social logo

secretlounge-ng's Introduction

secretlounge-ng

Rewrite of secretlounge, a bot to make an anonymous group chat on Telegram.

The bot accepts messages, pictures, videos, etc. from any user and relays it to all other active users without revealing the author.

Setup

pip3 install -r requirements.txt
cp config.yaml.example config.yaml
# Edit config.yaml with your favorite text editor.
./secretlounge-ng

To run the bot in the background use a systemd service (preferred) or screen/tmux.

@BotFather Setup

Message @BotFather and configure your bot as follows:

  • /setprivacy: enabled
  • /setjoingroups: disabled
  • /setcommands: paste the command list below

Command list

start - Join the chat (start receiving messages)
stop - Leave the chat (stop receiving messages)
users - Find out how many users are in the chat
info - Get info about your account
sign - Sign a message with your username
s - Alias of sign
tsign - Sign a message with your tripcode
t - Alias of tsign
motd - Show the welcome message
version - Get version & source code of this bot
modhelp - Show commands available to moderators
adminhelp - Show commands available to admins
toggledebug - Toggle debug mode (sends back all messages to you)
togglekarma - Toggle karma notifications
tripcode - Show or set the tripcode for your messages

FAQ

  1. How do I unban a blacklisted user from my bot?

To unban someone you need their Telegram User ID (preferred) or username/profile name. If you have a name you can use ./util/blacklist.py find to search your bot's database for the user record.

You can then run ./util/blacklist.py unban 12345678 to remove the ban.

  1. How do I demote somone I promoted to mod/admin at some point?

If you already have an User ID in mind, proceed below. Otherwise you can either use the find utility like explained above or run ./util/perms.py list to list all users with elevated rank.

Simply run ./util/perms.py set 12345678 user to remove the users' privileges.

This can also be used to grant an user higher privileges by exchanging the last argument with "mod" or "admin".

  1. What is the suggested setup to run multiple bots?

The blacklist.py and perms.py script, including advanced functions like blacklist syncing (./util/blacklist.py sync), support a structure like the following where each bot has its own subdirectory:

root folder
\-- bot1
  \-- db.sqlite
  \-- config.yaml
\-- bot2
  \-- db.sqlite
  \-- ...
\-- ...
\-- README.md
\-- secretlounge-ng
  1. Is this bot really anonymous?

When using the source in this repository¹, unless you reveal yourself, ordinary users in the bot have zero possibilities of discovering your Telegram user.

Mods and admins in the bot can tell the authors of recent messages apart through a pseudo-random ID returned by the /info command. This ID changes every 24 hours, posts also expire from the cache after 24 hours² (or if secretlounge-ng is restarted) meaning that they become unable to be deleted or their authors determined.

People with access to the server the bot runs on have no direct, but a variety of indirect ways to determine who wrote a particular message.

¹: It is impossible to ascertain this from afar. You have to trust the bot owner either way.

²: Sophisticated attacks are possible to track continously active users over a longer timeframe. It is not expected that a human can perform this.

All of these assessments presume a sufficient user population in the bot so that anyone could blend in.

  1. Why don't polls work?

Telegram bots are able to create new polls and forward messages (including authorship), but they can't forward the poll itself as with other message types. Working around this is possible with some disadvantages, but has not been implemented yet.

  1. Is this code maintained?

This codebase is in active use over here. Updates are made either if there's something broken or when the author feels like it.

Notable forks

  • CatLounge - has numerous new features including specifying cooldown time
  • Furry fork - not sure, but there's a bunch of things

secretlounge-ng's People

Contributors

sfan5 avatar raku-cat avatar cronixx avatar yesnomaybeyes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.