Link Search Menu Expand Document

danog\DialogId\DialogId

Back to index

Author: Daniil Gentili daniil@daniil.it

Represents the type of a bot API dialog ID.

Constants

  • danog\DialogId\DialogId::USER: Dialog type: user.

  • danog\DialogId\DialogId::CHAT: Dialog type: chat.

  • danog\DialogId\DialogId::CHANNEL_OR_SUPERGROUP: Dialog type: supergroup or channel, see https://core.telegram.org/api/channel for more info.

  • danog\DialogId\DialogId::SECRET_CHAT: Dialog type: secret chat.

Properties

  • $name: string

Method list:

Methods:

getType(integer $id): self

Get the type of a dialog using just its bot API dialog ID.

Parameters:

  • $id: integer Bot API ID.

isSupergroupOrChannel(int $id): bool

Checks whether the provided bot API ID is a supergroup or channel ID.

Parameters:

  • $id: int

isChat(int $id): bool

Checks whether the provided bot API ID is a chat ID.

Parameters:

  • $id: int

isUser(int $id): bool

Checks whether the provided bot API ID is a user ID.

Parameters:

  • $id: int

isSecretChat(int $id): bool

Checks whether the provided bot API ID is a secret chat ID.

Parameters:

  • $id: int

fromSecretChatId(int $id): int

Convert MTProto secret chat ID to bot API secret chat ID.

Parameters:

  • $id: int MTProto secret chat ID

Return value: Bot API secret chat ID

toSecretChatId(int $id): int

Convert bot API secret chat ID to MTProto secret chat ID.

Parameters:

  • $id: int Bot API secret chat ID

Return value: MTProto secret chat ID

fromSupergroupOrChannelId(int $id): int

Convert MTProto channel ID to bot API channel ID.

Parameters:

  • $id: int MTProto channel ID

toSupergroupOrChannelId(int $id): int

Convert bot API channel ID to MTProto channel ID.

Parameters:

  • $id: int Bot API channel ID

fromChatId(int $id): int

Convert MTProto chat ID to bot API chat ID.

Parameters:

  • $id: int MTProto chat ID

toChatId(int $id): int

Convert bot API chat ID to MTProto chat ID.

Parameters:

  • $id: int Bot API chat ID

fromUserId(int $id): int

Convert MTProto user ID to bot API user ID.

Parameters:

  • $id: int MTProto user ID

toUserId(int $id): int

Convert bot API user ID to MTProto user ID.

Parameters:

  • $id: int Bot API user ID

cases(): array


Generated by danog/phpdoc