A Telegram Bot that gives a random quote of Age of Empires 2 original edition
Project description
aoe2-telegram-bot
Age Of Empires II Telegram Bot: give a random quote of Age of Empires 2 original edition
Installation
Install python package from PyPI
python3 -m pip install aoe2-telegram-bot
Or from source
git clone https://github.com/PercevalSA/aoe2-telegram-bot
cd aoe2-telegram-bot
python3 -m pip install .
Set an environment file with your telegram bot token as TGB_TOKEN
mkdir -p $HOME/.config/aoe2-telegram-bot
echo 'TGB_TOKEN=xxxx' >$HOME/.config/aoe2-telegram-bot/env
running
When started for the first time the bot will download sounds from internet and store them in the package folder.
When you start the bot manually you will need to export the token as environment variable or set it in the environment file in $HOME/.config/aoe2-telegram-bot/env
export TGB_TOKEN=xxxx
or create config directory and add token
mkdir -p ~/.config/aoe2-telegram-bot
echo 'TGB_TOKEN=your_token_here' > ~/.config/aoe2-telegram-bot/env
Then just run
aoe2-telegram-bot
Configuration Options
You can configure the bot using environment variables:
TGB_TOKEN- Your Telegram bot token (required)LOG_LEVEL- Logging level:DEBUG,INFO,WARNING,ERROR,CRITICAL(default:INFO)
Example with custom log level:
export TGB_TOKEN=your_token_here
export LOG_LEVEL=DEBUG
aoe2-telegram-bot
Running as a Service
If you need the bot to run as a service you can use the provided systemd service file generated by the bootstrap command
aoe2-telegram-bot-bootstrap
sudo cp aoe2-telegram-bot.service /etc/systemd/system/aoe2-telegram-bot.service
sudo systemctl daemon-reload
sudo systemctl enable aoe2-telegram-bot
sudo systemctl start aoe2-telegram-bot
Installed sounds
taunt.zipare french taunt inmp3format. There are 42 taunts in total.- their name are composed of a 2 padded number (like 02 or 15), a space and the name
civilization.zipare all specific civilization start sounds inmp3format- their name is a single word starting with a capital letter
sound.zipare all in game sounds (building, generic units...) inwavformat- their name is full lowercase and can have a number only at the end (e.g. multiples sounds for the same thing)
How to get sounds
to get sound checks your steam files in $HOME/.steam/steam/steamapps/common/AoE2DE/wwise/ and get pck files.
Get the softwares
You need to extract .pck that contains .bnk files that contain wem files that you need to convert to wav or ogg.
- extract pck but is windows only
- extract bnk or this updated one
- convert ww to ogg
If you build wwisexmabank or xmash on mondern Linux add $(CC) $^ -o $@ $(LDFLAGS) on line 10 in Makefile.common
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aoe2_telegram_bot-0.4.0.tar.gz.
File metadata
- Download URL: aoe2_telegram_bot-0.4.0.tar.gz
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
680c34fa03cb57df6b02c74ec6ed00985aca2782021f755744e5901a5a67e52e
|
|
| MD5 |
72f54816cd7187ceb4ea90cab17ac615
|
|
| BLAKE2b-256 |
25a3e3667efcbb2f98f22142958f8e229b3b8b2ee6e412af63c97ebf9066c377
|
Provenance
The following attestation bundles were made for aoe2_telegram_bot-0.4.0.tar.gz:
Publisher:
python.yml on PercevalSA/aoe2-telegram-bot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aoe2_telegram_bot-0.4.0.tar.gz -
Subject digest:
680c34fa03cb57df6b02c74ec6ed00985aca2782021f755744e5901a5a67e52e - Sigstore transparency entry: 712539817
- Sigstore integration time:
-
Permalink:
PercevalSA/aoe2-telegram-bot@4ce0d39bf3f04c565c6a25534e939fec8d510f7b -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/PercevalSA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yml@4ce0d39bf3f04c565c6a25534e939fec8d510f7b -
Trigger Event:
push
-
Statement type:
File details
Details for the file aoe2_telegram_bot-0.4.0-py3-none-any.whl.
File metadata
- Download URL: aoe2_telegram_bot-0.4.0-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a970a6c0a6fa5b74b1858399c1ba072c1dce6e072bec0fd0dc59d5efbec93380
|
|
| MD5 |
a56b55bcebeaf7cb48c6fabeb2035b98
|
|
| BLAKE2b-256 |
3d1ac6e023676b7e627f485fe89d88a63f3fefeb5f1ceb85f76fd60971514abb
|
Provenance
The following attestation bundles were made for aoe2_telegram_bot-0.4.0-py3-none-any.whl:
Publisher:
python.yml on PercevalSA/aoe2-telegram-bot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aoe2_telegram_bot-0.4.0-py3-none-any.whl -
Subject digest:
a970a6c0a6fa5b74b1858399c1ba072c1dce6e072bec0fd0dc59d5efbec93380 - Sigstore transparency entry: 712539821
- Sigstore integration time:
-
Permalink:
PercevalSA/aoe2-telegram-bot@4ce0d39bf3f04c565c6a25534e939fec8d510f7b -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/PercevalSA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yml@4ce0d39bf3f04c565c6a25534e939fec8d510f7b -
Trigger Event:
push
-
Statement type: