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
toldium is a modular, fast, reliable and customizable multiplatform bot library for your communities

toldium The easy multiplatform bot toldium is a modular, fast, reliable and customizable multiplatform bot library for your communities, from a commun

Stockdroid Fans 5 Nov 03, 2021
SickNerd aims to slowly enumerate Google Dorks via the googlesearch API then requests found pages for metadata

CLI tool for making Google Dorking a passive recon experience. With the ability to fetch and filter dorks from GHDB.

Jake Wnuk 21 Jan 02, 2023
Scratch2py or S2py is a easy to use, versatile tool to communicate with the Scratch API Based of Scratch2py

Scratch2py Scratch2py or S2py is a easy to use, versatile tool to communicate with the Scratch API Based of Scratch2py Installation Run this command i

2 Jan 13, 2022
Example code for interacting with solana anchor programs - candymachine

candypy example code for interacting with solana anchor programs - candymachine THIS IS PURELY SAMPLE CODE TO FORK, MODIFY, UNDERSTAND AND INTERACT WI

dubbelosix 3 Sep 18, 2022
GUI Pancakeswap V2 and Uniswap V3 trading client (and bot)MOST ADVANCE TRADING BOT SUPPORT WINDOWS LINUX MAC

GUI Pancakeswap 2 and Uniswap 3 trading client (and bot) (MOST ADVANCE TRADING BOT SUPPORT WINDOWS LINUX MAC) UPDATE: MUTI TRADE TOKEN ENABLE ,TRADE 1

2 Dec 27, 2021
An API wrapper for Henrik's Unofficial VALORANT API

ValorantAPI.py An API wrapper for Henrik's Unofficial VALORANT API Warning!! This project is still in beta and only contains barely anything yet. If y

Jakkaphat Chalermphanaphan 0 Feb 04, 2022
Pincer-ext-commands - A simple, lightweight package for pincer prefixed commands

pincer.ext.commands A reimagining of pincer's command system and bot system. Ins

Vincent 2 Jan 11, 2022
SmartFile API Client (Python).

A SmartFile Open Source project. Read more about how SmartFile uses and contributes to Open Source software. Summary This library includes two API cli

SmartFile 19 Jan 11, 2022
Some random bot for Discord which was created just for fun (Made with Discord.py library)

Ghosty Previously known as 'secondthunder-py-bot' This is repository of some random bot for Discord which was created just for fun and for some educat

Владислав 8 Oct 02, 2022
send sms via grafana alert webhook

notifier fire alarm What does this project do: the aim of this project is to send alarm notification from grafana alert manager via kavenegar api. sta

Ali Soltani 4 Oct 20, 2021
this is an op music pyrogram music bot.

amanrajputpytgcallmusic this is an op music pyrogram music bot..... this bot user music bot can play music without being admin...... TG-MusicPlayer A

2 Dec 27, 2021
Script to get a notification when a product, on Amazon Warehouse, is available within a target price

Amazon_Warehouse_Scraping This script aims to scrape Amazon Warehouse and send an email back if there are products whose price matches with the target

2 Oct 25, 2021
Twitter-bot - A Simple Twitter bot with python

twitterbot To use this bot, You will require API Key and Access Key. Signup at h

Bentil Shadrack 8 Nov 18, 2022
Cyber Userbot

Cyber Userbot

Irham 0 May 26, 2022
Instagram bot for promoting ROKA trainee soldier(just like me)'s consolation letters.

Instagram_bot (필자를 포함한) 모든 대한민국 훈련병들을 위한 인스타그램 인편지기입니다. Instagram bot for promoting ROKA trainee soldier(just like me)'s consolation letters. 들어가기 (Ge

Lee, Jongjun 2 Nov 21, 2021
Python wrappers for INHECO ODTC and SCILA libraries by INHECO GmbH.

Python wrappers for INHECO ODTC and SCILA libraries by INHECO GmbH.

1 Feb 09, 2022
Python client for QIWI payment system

Pyqiwi Lib for QIWI payment system Installation pip install pyqiwi Usage from decimal import Decimal from datetime import datetime, timedelta from p

Andrey 12 Jun 03, 2022
A Telegram bot to download from Youtube server.

IDN-YoutubeDL-Bot A Telegram bot to download from Youtube server. Configs 📖 API_ID - Your APP ID. Get it from my.telegram.org API_HASH - Your API_HAS

IDNCoderX 4 Dec 02, 2022
Widevine MPD Content Downloader & Decryptor

Widevine-DL Encrypted MPD Manifest Content Downloader + Decryptor (not a Widevine Key Extractor!) Requirements ffmpeg, yt-dlp, aria2, widevine-l3-decr

Vank0n (SJJeon) 170 Dec 30, 2022
An API that uses NLP and AI to let you predict possible diseases and symptoms based on a prompt of what you're feeling.

Disease detection API for MediSearch An API that uses NLP and AI to let you predict possible diseases and symptoms based on a prompt of what you're fe

Sebastian Ponce 1 Jan 15, 2022