ba0f3 / telebot.nim

Async Telegram Bot API Client implement in @Nim-Lang
MIT License
165 stars 24 forks source link

Deleting messages? #42

Closed Michal-Szczepaniak closed 5 years ago

Michal-Szczepaniak commented 5 years ago

Is it possible to delete message? i tried to use deleteMessage but it caused whole bot to freeze and nothing more.

ba0f3 commented 5 years ago

yes, you can delete messages. make sure your bot has permission to do it

Michal-Szczepaniak commented 5 years ago

but is the deleteMessage correct funcion? it seems to freeze my whole bot

ba0f3 commented 5 years ago

Can you show me your code? deleteMessage api works fine for me https://github.com/ba0f3/telebot.nim/blob/master/examples/delete_message.nim

Michal-Szczepaniak commented 5 years ago

How do you check though if bot have delete permissions? it's not included in example

ba0f3 commented 5 years ago

see here: https://github.com/rupansh/nim-tg-manager/blob/ade8068e2ff6ae95902b7d364a7b01e168275237/src/tg_managerpkg/essentials.nim#L43

Michal-Szczepaniak commented 5 years ago

Thank you!