Der-Henning / tgtg

Scanner for Too Good To Go Notifications
https://github.com/Der-Henning/tgtg/wiki
GNU General Public License v3.0
415 stars 68 forks source link

Discord bot to make reservations? #526

Open olzhang opened 3 months ago

olzhang commented 3 months ago

Hi,

thanks for making this project! Quick q, i noticed that the telegram bot allows you to make reservations. Is there a way to do this using the discord bot? If not, is there any plans to develop this feature?

Thanks!

Der-Henning commented 3 months ago

Hi @olzhang.

Yes it shouldn't be too difficult to implement a bot for discord. As I have very limited time ressources for this project at the moment I can only maintain it and cannot implement new features. But I will help anyone who is willing to contribute to the project.

olzhang commented 3 months ago

Hi,

Yea definitely. I was just curious if someone is currently working on something like this already. If not, I'd be happy to do it. I was thinking of doing something like this:

reserve command Implement this bot command: <prefix>reserve <favoriteid> <quantity> E.g. !reserve 12345 1

and then bot will respond back with something like

reserved <quantity> bags from <favoriteid> <name> <description>

e.g. reserved 2 bags from 12345 Paris Baguette Times Square (Baked Goods)

cancel command Implement this bot command: <prefix>cancelreservation <favoriteid> <quantity> E.g. !cancel 12345 1

and then bot will respond back with something like

cancelled <quantity> bags from <favoriteid> <name> <description>

e.g. cancelled 2 bags from 12345 Paris Baguette Times Square (Baked Goods)

or in the case of no reservations found for this particular favoriteid it will respond with something like no reservations found for <favoriteid> <name> <description>

cancelall command Implement this bot command: <prefix>cancelall E.g. !cancelall

and then bot will respond back with something like

all reservations cancelled

e.g. cancelled 2 bags from 12345 Paris Baguette Times Square (Baked Goods)

or in the case of no reservations found for this particular favoriteid it will respond with something like no reservations found for <favoriteid> <name> <description>

cancelall command Implement this bot command: <prefix>cancelall E.g. !cancelall

and then bot will respond back with something like

all reservations cancelled

listreservations Implement this bot command: <prefix>listreservations E.g. !listreservations

and then bot will respond back with something a list of active reservations

Of course, also a mechanism to notify user of when reservations are made.

Gimme a day or 2 to think about how to implement all this and I'll come back to this thread before I code anything

But happy for any thoughts/feedback