From 1c71d79eca098b8ffb626cfcc2f159f56d3c1c13 Mon Sep 17 00:00:00 2001 From: f1reflyyyylmao <17353799+f1reflyyyylmao@users.noreply.github.com> Date: Fri, 3 Sep 2021 21:57:40 +0200 Subject: [PATCH] fixed message deletion (#51) --- src/tourmaline/client/core_methods.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tourmaline/client/core_methods.cr b/src/tourmaline/client/core_methods.cr index 1f1f6413b..e7fb9234c 100644 --- a/src/tourmaline/client/core_methods.cr +++ b/src/tourmaline/client/core_methods.cr @@ -136,7 +136,7 @@ module Tourmaline # Returns `true` on success. def delete_message(chat, message) chat_id = chat.is_a?(Int::Primitive | String) ? chat : chat.id - message_id = message.is_a?(Int::Primitive | Nil) ? message : message.id + message_id = message.is_a?(Int::Primitive | Nil) ? message : message.message_id request(Bool, "deleteMessage", { chat_id: chat_id,