GitHunt
SF

SF-ZeBug/informabot

A Telegram bot to assist other undergraduate Computer Science students at the University of Bologna.

Informabot

A Telegram bot to assist other undergraduate Computer Science students at the
University of Bologna.

Dependencies

Node.js 12.2.2 or higher is required.

Running

To run the bot from the project directory, simply use

node index.js $TOKEN

where $TOKEN is the authorization token you got from
BotFather.

Commands

When setting up your bot with
BotFather, you'll be
asked to "send a list of commands for your bot". Consider using this one:

help - Elenca i comandi disponibili

appunti - Appunti su Notion

cercogruppo - Cerca un gruppo di progetto

dns - I DNS di ALMAWIFI

gruppi - Gruppi Telegram, server Discord e subreddit

lezionioggi - Orari lezioni di oggi (tuo anno)

lezionioggi1 - Orari lezioni di oggi (1° anno)

lezionioggi2 - Orari lezioni di oggi (2° anno)

lezionioggi3 - Orari lezioni di oggi (3° anno)

lezionidomani - Orari lezioni di domani (tuo anno)

lezionidomani1 - Orari lezioni di domani (1° anno)

lezionidomani2 - Orari lezioni di domani (2° anno)

lezionidomani3 - Orari lezioni di domani (3° anno)

materiali - Libri, materiali, prove e altro su CSUnibo

noncercogruppo - Smetti di cercare un gruppo di progetto

registrate - Lezioni registrate su OneDrive

stickers - Pacchetti degli adesivi Telegram del corso

tesi - Tesi DISI proposte e assegnate

architettura - Tutto su Architettura degli elaboratori

logica - Tutto su Logica per l'informatica

programmazione - Tutto su Programmazione

algebra - Tutto su Algebra e geometria

algoritmi - Tutto su algoritmi e strutture di dati

analisi - Tutto su Analisi matematica

calcolo - Tutto su Calcolo numerico

ottimizzazione - Tutto su Ottimizzazione combinatoria

linguaggi - Tutto su Linguaggi di programmazione

reti - Tutto su Reti di calcolatori

sistemi - Tutto su Sistemi operativi

basi - Tutto su Basi di dati

ingegneria - Tutto su Ingegneria del software

apprendimento - Tutto su Apprendimento automatico

cybersecurity - Tutto su Fondamenti di cybersecurity

teorica - Tutto su Informatica teorica

progetto - Tutto su Progetto di sistemi virtuali

fisica - Tutto su Fisica

applicazioni - Tutto su Laboratorio di applicazioni mobili

storia - Tutto su Storia dell'informatica e dei dispositivi di calcolo

strategia - Tutto su Strategia aziendale

Adding new commands

Actions

Actions are stored in json/actions.json. Each key is the name of the command
triggering the action, while each value is an object describing the action
itself through several attributes:

  • type specifies the command logic. Available types are listed below, each
    with its own specialized attributes;
  • description (optional) sums up the objective of the action.

message

The bot replies with a static message, specified by the text attribute.

help

The bot replies listing each command-description pair. If a command has no
description, it is not listed.

alias

These commands are just aliases for others. The command attribute specifies
which command this alias is referring to. Beware of circular alias chains, which
will result in a stack overflow.

lookingFor

The bot adds the user to the list of people looking for project mates in this
chat, and replies with the updated list. singularText, pluralText, and
chatError attributes are used as custom messages to communicate with the user.

notLookingFor

The bot removes the user from the list of people looking for project mates in
this chat. chatError and notFoundError messages are used to communicate with
the user.

yearly

Much like an alias with abc as its command attribute value runs the abc
action, a yearly action with abc as its command attribute value may run
either the abc1, abc2, or the abc3 command, depending on the chat. The
bot inspects the chat title, and attempts to figure out the appropriate year.
If the bot can't figure out the year, the noYear attribute value is used as
a default reply.

todayLectures

Scrapes today's timetable from url, using title as header. On faliure,
fallbackText is used as a reply.

tomorrowLectures

Scrapes tomorrow's timetable from url, using title as header. On faliure,
fallbackText is used as a reply.

course

Puts together a summary for a given course, featuring its name, Virtuale link
(virtuale), Teams link (teams), official website link, as well as the
email addresses of the professors.

Memes

Memes are stored in json/memes.json. Each key is the name of the command
triggering the meme, while each value is the content of the reply by the bot (a
simple static message).

Acknowledgments

Many thanks to @Wifino, who wrote the original
codebase.

Languages

JavaScript100.0%

Contributors

GNU General Public License v3.0
Created September 6, 2022
Updated July 30, 2022