Bot per la chat live del corso di sistemi operativi UniBO

Overview

cravattaBot

TL;DR: Ho fatto un bot telegram per la chat del corso di sistemi.

Indice


Installazione e prerequisiti

Prerequisiti

Utilizzeremo due librerie di python:

puoi eseguire questo comando per installarle direttamente

sudo python3 -m pip install -r requirements.txt

oppure installarle singolarmente

sudo python3 -m pip install telepot
sudo python3 -m pip install eel

oppure seguire la guida all'installazione dai siti ufficiali telepot eel

Installazione

Basta clonare la repo:

sudo git clone https://github.com/takenX10/cravattaBot

Setup

Configurazione dati

RICORDATI DI SEGUIRE I PASSI SPIEGATI NELL'INSTALLAZIONE

Come prima cosa configurare i dati all'interno del file src/botdata.py, in particolare vanno modificati:

  • token -> il token del bot di telegram da prendere dal botfather
  • chatid -> l'id della chat dove avverrΓ  il redirect dei messaggi da parte del bot
    • -1 per non fare redirect
  • debug_print -> le print di debug
    • True o False
  • autoscroll -> Attiva o disattiva l'autoscroll del sito all'ultimo messaggio

Come creare il bot e prendere il token

Quotando la documentazione ufficiale di telegram

There's a… bot for that. Just talk to BotFather (described below) and follow a few simple steps.

Come trovare il chatid

A meno che l'api di telegram venga modificata questi sono i passaggi:

  1. Dal client di telegram crea un gruppo e aggiungi dentro il bot
  2. Manda un messaggio qualsiasi di prova
  3. Apri https://api.telegram.org/bot /getUpdates dove sostituisci con il token del bot (quindi se il token fosse ABCD:22AABB dovresti aprire https://api.telegram.org/botABCD:22AABB/getUpdates)
  4. All'interno delle info del messaggio dovrebbe essere presente il chat-id del gruppo.

Nel caso di modifiche googla la soluzione, Γ¨ abbastanza banale in ogni caso.

Esecuzione

Ricordati di installare telepot e eel e di modificare i dati all'interno di botdata.py

python3 src/cravattaBot.py

Possibili miglioramenti

  • Migliorare la gui
  • Aggiungere il color coding per il codice
  • Cambiare telepot con un'altra libreria ancora aggiornata
Owner
Alessandro Frau
Software Developer and Computer Science Student. I am currently studying Computer Science at the University of Bologna. I also play some CTFs with @srdnlen.
Alessandro Frau
Deploy your apps on any Cloud provider in just a few seconds

The simplest way to deploy your apps in the Cloud Deploy your apps on any Cloud providers in just a few seconds ⚑ Qovery Engine is an open-source abst

Qovery 1.9k Dec 26, 2022
Binance leverage futures Hook

Simple binance futures Attention Just use leverage. The fee difference between futures and spot is not considered. For example, funding rate, etc. Onl

Adriance 26 Aug 27, 2022
Web3 Pancakeswap Sniper & honeypot detector Take Profit/StopLose bot written in python3, For ANDROID WIN MAC & LINUX

Pancakeswap BSC Sniper Bot web3 with honeypot detector (ANDROID WINDOWS MAC LINUX) First SNIPER BOT for ANDROID with honeypot detector Web3 Pancakeswa

HYDRA 1 Dec 23, 2021
A Python script to create customised Spotify playlists using the JSON, Spotipy Library and Spotify Web API, based on seed tracks in your history.

A Python script to create customised Spotify playlists using the JSON, Spotipy Library and Spotify Web API, based on seed tracks in your history.

Youngseo Park 1 Feb 01, 2022
This is a simple program that uses Python and pyTwitchAPI to retrieve the list of users in a streamer's chat and then checks each one of these users to see if they follow the broadcaster or not

This is a simple program that uses Python and pyTwitchAPI to retrieve the list of users in a streamer's chat and then checks each one of these users to see if they follow the broadcaster or not

RwinShow 57 Dec 18, 2022
A tool to customize your discord tokens

Fastest Discord Token Manager - Features: Change Token Username Change Token Password Change Token Avatar Change Token Bio This tool is created by Ace

trey 15 Dec 27, 2022
A AntiChannelBan Telegram Group Bot Open Source

AntiChannelBan This is a Anti Channel Ban Robots delete and ban message sent by channels Deployment Method Heroku πš‚πš„π™Ώπ™Ώπ™Ύπšπšƒ CREDIT BrayDen Blaze

βœ— BᡣₐyDβ‚‘β‚™ βœ— 14 May 02, 2022
A python SDK for interacting with quantum devices on Amazon Braket

Amazon Braket Python SDK The Amazon Braket Python SDK is an open source library that provides a framework that you can use to interact with quantum co

Amazon Web Services 213 Dec 14, 2022
Collection of AWS Fault Injection Simulator (FIS) experiment templates.

Collection of AWS Fault Injection Simulator (FIS) experiment templates. These templates let you perform chaos engineering experiments on resources (applications, network, and infrastructure) in the A

Adrian Hornsby 8 Nov 27, 2022
This is a TG Video Compress BoT. Product by BINARY Tech

πŸŒ€ Video Compressor Bot Product by BINARY Tech Deploy to Heroku The Hard Way virtualenv -p python3 VENV . ./VENV/bin/activate pip install -r requireme

1 Jan 04, 2022
szrose is an all in one group management bot made for managing your group effectively with some advance security tools & Suit For All Your Needs ❀️

szrose is an all in one group management bot made for managing your group effectively with some advance security tools & Suit For All Your Needs ❀️

szsupunma 93 Jan 07, 2023
Music bot for playing music on telegram voice chat group.

Somali X Music 🎡 Music bot for playing music on telegram voice chat group. Requirements FFmpeg NodeJS nodesource.com Python 3.8+ or Higher PyTgCalls

Abdisamad Omar Mohamed 4 Dec 01, 2021
An alternative to OpenFaaS nats-queue-worker for long-running functions

OpenFaas Job Worker OpenFaas Job Worker is a fork of project : OSCAR Worker - https://github.com/grycap/oscar-worker Thanks to SebΓ‘stian Risco @srisco

Sebastien Aucouturier 1 Jan 07, 2022
MicroStealer - A compact Discord Token Logger/Discord Token Grabber made in only 15 lines of code! Injects into discord for long-term use

πŸ’Ύ MicroStealer ⚑ A compact Discord Token Logger/Discord Token Grabber made in o

DeKrypt 24 Sep 21, 2022
This is a very simple botnet with a CnC server, made by me. Feel free to change anything

This is a very simple botnet with a CnC server, made by me. Feel free to change anything

8 Nov 12, 2022
A telegram bot help you to get stylish fonts and text

Stylish Font Bot 🐿 This is a telegram bot help you to get stylish fonts and text. Config Vars πŸ€– API_HASH: Get this value from my.telegram.org. API_K

MSTL updates 1 Nov 08, 2021
A Simple Telegram Maths Calculator Bot

Calculator-Bot-v1 A Simple Telegram Maths Calculator Bot Demo BOT LINK: Variables Variables Required Variables API_HASH: Get

α—ͺα—©α–‡K ✞Oα–‡α—ͺ 1 Dec 18, 2021
MCNameBot is a fast discord bot that is used to check the availability of a Minecraft name with a simple command.

MCNameBot MCNameBot is a fast discord bot that is used to check the availability of a Minecraft name with a simple command. If you would like to just

Killin 2 Oct 11, 2022
HackZ-Token-Grabber-V2 - HackZ Token Grabber V2

HackZ-Token-Grabber-V2 was made by Love ❌ code βœ… β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž 🌟

! β„’NightMare 2 Mar 01, 2022
Python client for ETAPI of Trilium Note.

Python client for ETAPI of Trilium Note.

33 Dec 31, 2022