-
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 #7 from infra-blue/modreadme
Modreadme
- Loading branch information
Showing
1 changed file
with
28 additions
and
18 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 |
---|---|---|
|
@@ -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 | ||
|
@@ -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 |