You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm updating teloxide from 0.12.2 to 0.15.0. After updated, I found the message.chat.invite_link() raise an error:
error[E0599]: the method `invite_link` exists for struct `Chat`, but its trait bounds were not satisfied
--> src\bot.rs:46:34
|
46 | let chat_link = message.chat.invite_link();
| ^^^^^^^^^^^ method cannot be called on `Chat` due to unsatisfied trait bounds
|
::: C:\Users\xxx\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\teloxide-core-0.11.2\src\types\chat.rs:10:1
|
10 | pub struct Chat {
| --------------- doesn't satisfy 5 bounds
|
= note: the following trait bounds were not satisfied:
`<teloxide::types::Chat as teloxide::requests::HasPayload>::Payload = teloxide::payloads::EditChatInviteLink`
which is required by `teloxide::types::Chat: teloxide::payloads::EditChatInviteLinkSetters`
`teloxide::types::Chat: teloxide::requests::HasPayload`
which is required by `teloxide::types::Chat: teloxide::payloads::EditChatInviteLinkSetters`
`<teloxide::types::Chat as teloxide::requests::HasPayload>::Payload = teloxide::payloads::RevokeChatInviteLink`
which is required by `teloxide::types::Chat: teloxide::payloads::RevokeChatInviteLinkSetters`
`teloxide::types::Chat: teloxide::requests::HasPayload`
which is required by `teloxide::types::Chat: teloxide::payloads::RevokeChatInviteLinkSetters`
`<&teloxide::types::Chat as teloxide::requests::HasPayload>::Payload = teloxide::payloads::EditChatInviteLink`
which is required by `&teloxide::types::Chat: teloxide::payloads::EditChatInviteLinkSetters`
`&teloxide::types::Chat: teloxide::requests::HasPayload`
which is required by `&teloxide::types::Chat: teloxide::payloads::EditChatInviteLinkSetters`
`<&teloxide::types::Chat as teloxide::requests::HasPayload>::Payload = teloxide::payloads::RevokeChatInviteLink`
which is required by `&teloxide::types::Chat: teloxide::payloads::RevokeChatInviteLinkSetters`
`&teloxide::types::Chat: teloxide::requests::HasPayload`
which is required by `&teloxide::types::Chat: teloxide::payloads::RevokeChatInviteLinkSetters`
`<&mut teloxide::types::Chat as teloxide::requests::HasPayload>::Payload = teloxide::payloads::EditChatInviteLink`
which is required by `&mut teloxide::types::Chat: teloxide::payloads::EditChatInviteLinkSetters`
`&mut teloxide::types::Chat: teloxide::requests::HasPayload`
which is required by `&mut teloxide::types::Chat: teloxide::payloads::EditChatInviteLinkSetters`
`<&mut teloxide::types::Chat as teloxide::requests::HasPayload>::Payload = teloxide::payloads::RevokeChatInviteLink`
which is required by `&mut teloxide::types::Chat: teloxide::payloads::RevokeChatInviteLinkSetters`
`&mut teloxide::types::Chat: teloxide::requests::HasPayload`
which is required by `&mut teloxide::types::Chat: teloxide::payloads::RevokeChatInviteLinkSetters`
I don't know how to solve this, and didn't find solution in CHANGELOG or docs.rs.
minimal:
use teloxide::{payloads::*, prelude::*};asyncfnhandler(message:Message){let chat_link = message.chat.invite_link();}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I'm updating teloxide from 0.12.2 to 0.15.0. After updated, I found the
message.chat.invite_link()raise an error:I don't know how to solve this, and didn't find solution in CHANGELOG or docs.rs.
minimal:
All reactions