Skip to main content

No project description provided

Project description

OrderBot

Matrix bot for take-out/delivery balance tracking

Installation (using Docker)

  1. Clone this repository
  2. Fill in matrix.env
DBPATH=
MUSERNAME=
MSERVER=
MPASSWORD=
  1. 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:

  • user commands: These commands are used to manage the users' accounts.
  • order commands: 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

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

Matrix-OrderBot-0.1.1.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Matrix_OrderBot-0.1.1-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file Matrix-OrderBot-0.1.1.tar.gz.

File metadata

  • Download URL: Matrix-OrderBot-0.1.1.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.4.2 CPython/3.11.1

File hashes

Hashes for Matrix-OrderBot-0.1.1.tar.gz
Algorithm Hash digest
SHA256 56b382fb0d0e433f0321a8e5823355ba199b3c3f9cf29092be4a455352010055
MD5 635842e1decaed91ece259e54517b6f6
BLAKE2b-256 6546ba36af919efd67680ec79a19f60d8ba1e153639fc036448eb95658187807

See more details on using hashes here.

File details

Details for the file Matrix_OrderBot-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for Matrix_OrderBot-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3135e938d926fe5f7924446519f5553a050fafefbb30dc6875acb44123abbe1e
MD5 800f0e1786057cacceb36d5ba750a34f
BLAKE2b-256 87d5ff5e1d59717c0bdfddf6280c9598759c7468c95f2da8fb12b922455f162f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page