OrderBot
Matrix bot for take-out/delivery balance tracking
Installation (using Docker)
- Clone this repository
- Fill in
matrix.env
DBPATH=
MUSERNAME=
MSERVER=
MPASSWORD=
- Start container with
docker-compose up -d
Usage
Invite the bot into a room (it will auto-join). Start commands with !ob.
Using --help or -h displays the help message for any command.
Commands
Overall, the commands are split into two categories:
usercommands: These commands are used to manage the users' accounts.ordercommands: These commands are used to order.
User commands
join join system with matrix-address
register register a different user, e.g. via just the name, use join to register yourself
transfer transfer money from one user to another
payout get a suggestion for a potential payout
balance display the balance of all users
init initialize a user's balance
exit deactivates user, if balance is zero
Order commands
start start a new collective order
add add item of a user to order
tip set tip of the order
remove remove a user's item from the current collective order, all items of a user or all users
edit edit the price of an item
end finish collective order
cancel cancel current collective order
print display current collective order
reopen reopen last order, if no current order
suggest return the last 5 ordered item of the user, with
pricing
reorder reorder the last item of a user, from the last order
history display history of the last [k] orders
Examples
Here, you can find a short set of commands which demonstrates the usage of the bot.
!ob user join --all
registers all users in the matrix room with their current display name and their matrix address
!ob order start "The Foo Bar"
starts a new collective order with the name "The Foo Bar"
!ob order add "Pizza" 10.50
adds an item with name "Pizza" and price of 10.50 to the collective order for the current user
!ob order add "Burger" --name @user:foo.bar 20
adds an item with name "Burger" and price 20.00 to the collective order for user @user:foo.bar, assuming that user is registered
!ob order tip 5
adds a tip of 5.00 to the collective order
!ob order end
ends the current collective order, assuming that the current user paid
Metadata
Release files for matrix-orderbot 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Matrix-OrderBot-0.1.1.tar.gz | 13.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Matrix_OrderBot-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.9 kB
Release files / Matrix-OrderBot-0.1.1.tar.gz
| Download URL | Matrix-OrderBot-0.1.1.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56b382fb0d0e433f0321a8e5823355ba199b3c3f9cf29092be4a455352010055
|
|
BLAKE2b-256 checksum How to use checksums |
6546ba36af919efd67680ec79a19f60d8ba1e153639fc036448eb95658187807
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.4.2 CPython/3.11.1
|
Release files / Matrix_OrderBot-0.1.1-py3-none-any.whl
| Download URL | Matrix_OrderBot-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3135e938d926fe5f7924446519f5553a050fafefbb30dc6875acb44123abbe1e
|
|
BLAKE2b-256 checksum How to use checksums |
87d5ff5e1d59717c0bdfddf6280c9598759c7468c95f2da8fb12b922455f162f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.4.2 CPython/3.11.1
|