Add notes reminding to update places after updating updates

This commit is contained in:
Maybe Waffle 2023-02-03 16:11:20 +04:00
parent b78a3afde3
commit e97ac18060
2 changed files with 16 additions and 0 deletions

View file

@ -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),

View file

@ -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,