Skip to content

Бот создан для учеников, школьные чаты которых находятся в "Сферум"! Бот будет пересылать все сообщения из Сферума в телеграм!

Notifications You must be signed in to change notification settings

xKARASb/SferumBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sferum Bot by @xKARASb

Powered by

Tech

The packages that this application runs on

Features

  • Catch text messages and send to TG
  • Catch media and send to TG (with TG limits)
  • Send forwared messages with media
  • You can get messages from several chats

How to use

Install app

  • Clone repository:
git clone https://github.com/xKARASb/SferumBot.git
cd ./SferumBot
  • Setup eviroment:
python3 -m venv ./venv
  • Activate enviroment:
source ./venv/bin/activate

Note

For Windows use .\venv\Scripts\Activate

  • Setup dependencies:
pip install -r requirements.txt

Setup .env file

  • Authentification cookie for bot:

Go to Sferum >> Ctrl + Shift + C >> Application >> Storage >> Cookies >> https://web.vk.me After that you will see a table with all cookies from this site! In filter put remixdsid and copy data from value column.

Congratulations 🎉 you get auth cookie now just add it to AUTH_COOKIE in example.env

  • Bot token:

Go to: @BotFather and create new bot. Then put HTTP API token in BOT_TOKEN in example.env

  • Telegram user id:

You can get it from @username_to_id_bot And put your id to TG_USER_ID in example.env

  • Telegram chat id:

If you want the bot to send you messages in private messages, just copy TG_USER_ID, else you can create a chat and add the bot there.

Important

Give administrator rights to your bot

Tip

To send messages to one of the topics of supergroup instead of general also add TG_TOPIC_ID

  • Sferum chat ids:

Get a peer (id) from chat url (https://web.vk.me/convo/{peer_id}) and add it to VK_CHAT_ID:

VK_CHAT_ID="200000015"
VK_CHAT_ID="200000015, 200000016"

So you can add several chats

  • Rename example.env to .env

Run app

python startup.py

License

MIT

Free Software, Hell Yeah!

About

Бот создан для учеников, школьные чаты которых находятся в "Сферум"! Бот будет пересылать все сообщения из Сферума в телеграм!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages