Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove before message or edit it #6

Open
tuanngocptn opened this issue Oct 15, 2020 · 6 comments
Open

Remove before message or edit it #6

tuanngocptn opened this issue Oct 15, 2020 · 6 comments

Comments

@tuanngocptn
Copy link

Hi,
First, Thanks for your wonderful bot, That help me a lot in my group to produce the event weekly easily.
But I saw the problem when everyone /in and /out or /maybe in the consecutive time. Then /whosinbot log list of peoples in, out, maybe multiple time.
And I hope bot can edit before message or delete before message and log only 1 time .
Thanks you very much.

@col
Copy link
Owner

col commented Oct 16, 2020

Very happy to hear that this bot has been helpful for you.

I don’t really understand your issue though. Can you please provide some more info and maybe an example of the problem?

Thanks

@tuanngocptn
Copy link
Author

tuanngocptn commented Oct 16, 2020

Screen Shot 2020-10-16 at 09 33 42

Hi Col,

With image, you can see the bot log the list of user many time, I know we have /shh option for making bot log only the number of person in-out-maybe. But with this option user alway use /louder for show the list to view other attendance people.
So, I would like WhosIsIn bot can remove all older logs and log the new message everytime when anyone using /in, /out, /maybe or /louder.

The result that I expect in the below picture

Screen Shot 2020-10-16 at 09 43 06

Thanks.

@col
Copy link
Owner

col commented Oct 28, 2020

Hi @tuanngocptn - Ok I understand the feature request now. Unfortunately this is not supported by the Telegram Bot API. Once the bot sends a message it cannot delete or edit it as far as I know.

@tuanngocptn
Copy link
Author

Hi @col
I just found this thing. https://core.telegram.org/bots/api#updating-messages. I think that is the answer for this feature.
Thanks

@col
Copy link
Owner

col commented Dec 2, 2020

Interesting. That API wasn't available last time I checked. Good find.

I don't have a lot of time to work on the bot these days but I'll try to look into this feature. Will be nice to write some elixir code again. 😄

@col
Copy link
Owner

col commented Dec 2, 2020

The API you've pointed out only allows for editing the message. Not sure if I can completely delete a message. I'll give it a try but if not I may just revert the message to the /shh version.

Alternative suggestions are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants