diff --git a/crates/teloxide-core/src/bot/api.rs b/crates/teloxide-core/src/bot/api.rs index 1eea1f74..380d41a4 100644 --- a/crates/teloxide-core/src/bot/api.rs +++ b/crates/teloxide-core/src/bot/api.rs @@ -1383,8 +1383,9 @@ impl Requester for Bot { type SendGame = JsonRequest; - fn send_game(&self, chat_id: ChatId, game_short_name: G) -> Self::SendGame + fn send_game(&self, chat_id: C, game_short_name: G) -> Self::SendGame where + C: Into, G: Into, { Self::SendGame::new(self.clone(), payloads::SendGame::new(chat_id, game_short_name)) diff --git a/crates/teloxide-core/src/local_macros.rs b/crates/teloxide-core/src/local_macros.rs index aa285426..a17441dc 100644 --- a/crates/teloxide-core/src/local_macros.rs +++ b/crates/teloxide-core/src/local_macros.rs @@ -1406,9 +1406,10 @@ macro_rules! requester_forward { (@method send_game $body:ident $ty:ident) => { type SendGame = $ty![SendGame]; - fn send_game(&self, chat_id: ChatId, game_short_name: G) -> Self::SendGame where G: Into { + fn send_game(&self, chat_id: C, game_short_name: G) -> Self::SendGame where C: Into, + G: Into { let this = self; - $body!(send_game this (chat_id: ChatId, game_short_name: G)) + $body!(send_game this (chat_id: C, game_short_name: G)) } }; (@method set_game_score $body:ident $ty:ident) => { diff --git a/crates/teloxide-core/src/requests/requester.rs b/crates/teloxide-core/src/requests/requester.rs index 0428d50b..06548ef3 100644 --- a/crates/teloxide-core/src/requests/requester.rs +++ b/crates/teloxide-core/src/requests/requester.rs @@ -1189,8 +1189,9 @@ pub trait Requester { type SendGame: Request; /// For Telegram documentation see [`SendGame`]. - fn send_game(&self, chat_id: ChatId, game_short_name: G) -> Self::SendGame + fn send_game(&self, chat_id: C, game_short_name: G) -> Self::SendGame where + C: Into, G: Into; type SetGameScore: Request;