mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-03 17:52:12 +01:00
Add notes reminding to update places after updating updates
This commit is contained in:
parent
b78a3afde3
commit
e97ac18060
2 changed files with 16 additions and 0 deletions
|
@ -62,6 +62,12 @@ impl Update {
|
|||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum UpdateKind {
|
||||
// NB: When adding new variants, don't forget to update
|
||||
// - `AllowedUpdate`
|
||||
// - `Update::user`
|
||||
// - `Update::chat`
|
||||
// - `DpHandlerDescription::full_set`
|
||||
// - `dispatching/filter_ext.rs`
|
||||
/// New incoming message of any kind — text, photo, sticker, etc.
|
||||
Message(Message),
|
||||
|
||||
|
|
|
@ -50,6 +50,16 @@ impl EventKind for Kind {
|
|||
fn full_set() -> HashSet<Self> {
|
||||
use AllowedUpdate::*;
|
||||
|
||||
// NB: We need to specify all update kinds by hand, because telegram doesn't
|
||||
// enable `ChatMember` by default:
|
||||
//
|
||||
// > A JSON-serialized list of the update types you want your bot to
|
||||
// > receive. For example, specify [“message”, “edited_channel_post”,
|
||||
// > “callback_query”] to only receive updates of these types. See Update
|
||||
// > for a complete list of available update types. Specify an empty list
|
||||
// > to receive all update types except chat_member (default). If not
|
||||
// > specified, the previous setting will be used.
|
||||
|
||||
[
|
||||
Message,
|
||||
EditedMessage,
|
||||
|
|
Loading…
Reference in a new issue