Type Alias InputPeerLike

InputPeerLike:
    | string
    | number
    | tl.TypePeer
    | tl.TypeInputPeer
    | tl.TypeInputUser
    | tl.TypeInputChannel
    | {
        inputPeer: tl.TypeInputPeer;
    }

Type that can be used as an input peer to most of the high-level methods. Can be:

  • number, representing peer's marked ID*
  • string, representing peer's username (without preceding @)
  • string, representing user's phone number
  • "me" and "self" which will be replaced with the current user/bot
  • Any object with inputPeer: tl.TypeInputPeer property
  • Raw TL object
  • Telegram has moved to int64 IDs. Though, Levin has confirmed that new IDs will still fit into int53, meaning JS integers are fine.