hopfenspace / MateBot

Micro service providing an API for MateBot clients

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option stop for /communism and /pay

myOmikron opened this issue · comments

Could it be worth implementing a /communism stop and /pay stop to stop the ongoing communism or pay? When searching for an ongoing communism it can be annoying to search for the correct communism which, so it would be nice to have a stop option.
The stop option should stop the ongoing communism / pay anf ofc not give the creator any money.

Another option would be /communism last to show the ongoing communism. The message id of the communism is saved, so you can reply easily to the message to link it. An option for this could be to send the communism message with its inline buttons, etc. again and replace the id in the database.

commented

I would prefer /communism show over /communism last.

Note that the message ID is stored nowhere in the database! The Update object of the callback query holds a reference to the message it was called from instead. So, in order to have the message ID of the current communism without the need of the callback query, this issue together with #38 requires database changes.

commented

It looks like #38 would be "the" solution for something like /communism show. However, this might get really, really hacky.

Therefore, a "simple" new command /showcommunism would be the better option. This command removes the inline keyboard of the old collective message somewhere in the same chat and edits its message text (e.g. adding outdated) and sends a new one as reply to the command. The new message has the inline keyboard attached.

If the user wants to close the current collective but doesn't want to search for the bot's message by hand, a quick /show will produce the message. Finally, the button CLOSE is just one tap / click away.

/communism's parser accepts show and stop
They need to be implemented in run()