Montefood bot
This bot is currently being used by Victoria Montefood, a catering restaurant. Many clients were writing or making calls on Telegram already, so they decided to automate this process with a bot.
View on Codeberg • Telegram
Features
- All orders are being sent to an admin
- Add a new menu category or an item in config.rs
- Leave a note for an order
- Store users in the database (users.ron) with info about their total order sum, their preferred name and location for the next order
- Send a newsletter to subscribed users (for admin)
- Subscribe/unsubscribe option for clients
- Leave a feedback
- Extensive logging of every
Result<T>
orOption<T>
allows to easily backtrack at what moment something went wrong.
How to use
- Export your Bot token that is given to you by BotFather. Check Teloxide instruction how to set it up depending on your OS.
git clone https://codeberg.org/nippleofanape/Telegram-MontefoodBot.git && cd Telegram-MontefoodBot
- either
RUST_LOG=trace cargo run
for an unoptimized development build, orcargo build --release
for a release build. Run the binary intarget/release
. - Many string literals are still inside
main.rs
so need to modify them or export toconfig.rs
. - To get a UserId(i64) either send a message to a bot and read it, or use Json bot