-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from DanEdens/main
Readme enhancements
- Loading branch information
Showing
3 changed files
with
90 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,77 @@ | ||
# Finder-UniCT Bot | ||
A Telegram bot for UNICT students that allows students to get to know each other semi-anonymously. | ||
A Telegram bot for [UNICT (University of Catania)](https://www.unict.it/en) students enabling them to connect semi-anonymously. | ||
|
||
## Bot's features | ||
## Features | ||
- **Login**: Authenticate with your UniCT email. | ||
- **Random Chat**: Engage in conversations with strangers. | ||
- **Interest Matching**: Specify your interests and connect with students of similar tastes. | ||
- **Global Chat**: Join a community chat with all UniCT students. | ||
|
||
- Login system with UniCT email | ||
- Chat with strangers | ||
- Choose your interests and the bot will match you with someone with similar tastes as yours | ||
- Global chat with all UniCT students | ||
> **Note**: The bot commands and their responses are in Italian. Use `/start` to initiate and `/help` for a command list. | ||
## Getting Started | ||
|
||
Send **'/start'** to start it, **'/help'** to see a list of commands. | ||
Please note that the commands and their answers are in Italian. | ||
### Obtain a Telegram Bot Token | ||
1. Open Telegram and search for @BotFather. | ||
2. Start a conversation with `/start`. | ||
3. Create a new bot using `/newbot`. | ||
4. Name your bot and assign a tag (it should end with `bot`). | ||
5. Copy the provided token. | ||
|
||
--- | ||
# Usage | ||
The bot operates through a set of commands and reacts to specific triggers. Below is an overview of the bot's main commands and their descriptions: | ||
|
||
## How to create a Telegram bot and get its token | ||
To start testing this bot you need to get a Telegram Bot's token: | ||
- Go to Telegram and search for @BotFather | ||
- Start it using `/start` | ||
- Create a new bot using the `/newbot`command | ||
- Give it a name and a tag (the tag must end with `bot`) | ||
- Now copy the token it gives you | ||
/start: Sends a welcome message. (Translation: messaggio di benvenuto) | ||
/help: Provides guidance on available commands. (Translation: ricevi aiuto sui comandi) | ||
/report: Allows users to report an issue or problem. (Translation: segnala un problema) | ||
/chatid: Returns the chat ID of the current conversation. This can be useful for debugging and administration purposes. | ||
The bot is also programmed to handle messages and commands in private chats, ensuring the safety and privacy of user interactions. | ||
|
||
## Requirements | ||
- Pip3 | ||
- Python3 | ||
### Running with Docker | ||
#### Using Docker Compose | ||
|
||
## Docker-compose | ||
```yaml | ||
version: '2' | ||
services: | ||
finderdmibot: | ||
image: ghcr.io/unict-dmi/finderunictbot | ||
container_name: finderunictbot | ||
volumes: | ||
- <your-settings.yaml>:/app/config/settings.yaml | ||
- <path-to-your-settings.yaml>:/app/config/settings.yaml | ||
restart: unless-stopped | ||
``` | ||
|
||
### Building locally | ||
``` | ||
**Local Build**: | ||
|
||
```bash | ||
\```bash | ||
git clone [email protected]:UNICT-DMI/FinderUniCT-Bot.git | ||
cd FinderUniCT-Bot | ||
docker build --tag finderunictbot . | ||
``` | ||
|
||
--- | ||
|
||
## Docker CLI | ||
To test the bot with docker compose on Windows follow these steps: | ||
1) Clone the repository | ||
2) Copy the existing `config/settings.yaml.dist` and rename it into `config/settings.yaml` | ||
3) In `token` add your Telegram bot's token | ||
4) Open the terminal on the cloned repository and run ```docker build -t finderunictbot .``` to build the new image | ||
5) Next run ```docker run -v "/c/Users/your/absolute/path/finderunictbot/config/settings.yaml":"/finderunictbot/config/settings.yaml" finderunictbot``` | ||
|
||
To test it with Linux follow the steps above to the point 4) and: | ||
|
||
5) Run ```$ docker run -v "/home/your/absolute/path/finderunictbot/config/settings.yaml":"/finderunictbot/config/settings.yaml" finderunictbot``` | ||
|
||
|
||
## Run live | ||
To test the bot directly on your machine follow these steps: | ||
1) Clone this repository | ||
2) Copy the existing `config/settings.yaml.dist` and rename it into `config/settings.yaml` | ||
3) In `token` add your Telegram bot's token | ||
4) Run `$ python main.py` to start the bot | ||
\``` | ||
|
||
#### Using Docker CLI | ||
|
||
1. Clone the repository. | ||
2. Make a copy of `config/settings.yaml.dist` and rename it to `config/settings.yaml`. | ||
3. Add your Telegram bot's token in the `token` field. | ||
4. Build the image: `docker build -t finderunictbot .` | ||
5. Run: | ||
|
||
- On Windows: | ||
\```bash | ||
docker run -v "C:\path\to\your\settings.yaml:/finderunictbot/config/settings.yaml" finderunictbot | ||
\``` | ||
|
||
- On Linux: | ||
\```bash | ||
docker run -v "/path/to/your/settings.yaml:/finderunictbot/config/settings.yaml" finderunictbot | ||
\``` | ||
|
||
### Running Natively | ||
|
||
1. Clone this repository. | ||
2. Copy `config/settings.yaml.dist` to `config/settings.yaml`. | ||
3. Update the `token` field with your Telegram bot's token. | ||
4. Execute: `python main.py`. | ||
|
||
## Credits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
python-telegram-bot==20.6 | ||
python-telegram-bot==13.5 | ||
pyyaml |