danog\DialogId\DialogId
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.danog\DialogId\DialogId::MONOFORUM: Dialog type: monoforum.
Properties
$name:string
Method list:
getType(integer $id): selfisSupergroupOrChannel(int $id): boolisSupergroupOrChannelOrMonoforum(int $id): boolisMonoforum(int $id): boolisChat(int $id): boolisUser(int $id): boolisSecretChat(int $id): boolfromSecretChatId(int $id): inttoSecretChatId(int $id): intfromSupergroupOrChannelId(int $id): inttoSupergroupOrChannelId(int $id): intfromChatId(int $id): inttoChatId(int $id): intfromMonoforumId(int $id): inttoMonoforumId(int $id): intfromUserId(int $id): inttoUserId(int $id): inttoMTProtoId(int $id): intcases(): array
Methods:
getType(integer $id): self
Get the type of a dialog using just its bot API dialog ID.
Parameters:
$id:integerBot API ID.
isSupergroupOrChannel(int $id): bool
Checks whether the provided bot API ID is a supergroup or channel ID.
Parameters:
$id:int
isSupergroupOrChannelOrMonoforum(int $id): bool
Checks whether the provided bot API ID is a supergroup, channel or monoforum.
Parameters:
$id:int
isMonoforum(int $id): bool
Checks whether the provided bot API ID is a monoforum.
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:intMTProto 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:intBot 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:intMTProto channel ID
toSupergroupOrChannelId(int $id): int
Convert bot API channel ID to MTProto channel ID.
Parameters:
$id:intBot API channel ID
fromChatId(int $id): int
Convert MTProto chat ID to bot API chat ID.
Parameters:
$id:intMTProto chat ID
toChatId(int $id): int
Convert bot API chat ID to MTProto chat ID.
Parameters:
$id:intBot API chat ID
fromMonoforumId(int $id): int
Convert MTProto monoforum ID to bot API monoforum ID.
Parameters:
$id:intMTProto monoforum ID
toMonoforumId(int $id): int
Convert bot API monoforum ID to MTProto monoforum ID.
Parameters:
$id:intBot API monoforum ID
fromUserId(int $id): int
Convert MTProto user ID to bot API user ID.
Parameters:
$id:intMTProto user ID
toUserId(int $id): int
Convert bot API user ID to MTProto user ID.
Parameters:
$id:intBot API user ID
toMTProtoId(int $id): int
Convert bot API ID to MTProto ID (automatically detecting the correct type).
Parameters:
$id:intBot API dialog ID
cases(): array
Generated by danog/phpdoc