Skip to content

Commit

Permalink
Merge pull request #7 from infra-blue/modreadme
Browse files Browse the repository at this point in the history
Modreadme
  • Loading branch information
infra-blue authored Nov 8, 2023
2 parents 5755d3e + 514f629 commit 5e372dd
Showing 1 changed file with 28 additions and 18 deletions.
46 changes: 28 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ A Telegram bot for [UNICT (University of Catania)](https://www.unict.it/en) stud
# 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:

/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.
- ```/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.

### Running with Docker
Expand All @@ -34,44 +36,52 @@ The bot is also programmed to handle messages and commands in private chats, ens
version: '2'
services:
finderdmibot:
image: ghcr.io/unict-dmi/finderunictbot
image: ghcr.io/unict-dmi/finderunict-bot:main
container_name: finderunictbot
volumes:
- <path-to-your-settings.yaml>:/app/config/settings.yaml
- "path-to-your-settings.yaml":/finderunictbot/config/settings.yaml
restart: unless-stopped

```
**Local Build**:
#### Building and running locally

1. Clone the repository:
```bash
git clone [email protected]:UNICT-DMI/FinderUniCT-Bot.git
cd FinderUniCT-Bot
docker build --tag finderunictbot .
$ git clone [email protected]:UNICT-DMI/FinderUniCT-Bot.git
```

#### 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 .`
4. Build the image:
```bash
$ cd FinderUniCT-Bot
$ docker build -t finderunictbot .
```
5. Run:

- On Windows:
```bash
docker run -v "C:\path\to\your\settings.yaml:/finderunictbot/config/settings.yaml" finderunictbot
$ 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
$ docker run -v "/path/to/your/settings.yaml:/finderunictbot/config/settings.yaml" finderunictbot
```

### Pull image from remote repository and run

```bash
$ docker run -v "/local/path/to/settings.yml":/finderunictbot/config/settings.yml -t ghcr.io/unict-dmi/finderunict-bot:main
```

### 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`.
4. Execute:
```bash
$ python main.py
```
## Credits

0 comments on commit 5e372dd

Please sign in to comment.