@@ -63,13 +63,13 @@ discard block |
||
| 63 | 63 | public int $message_id; |
| 64 | 64 | |
| 65 | 65 | /** Optional. Unique identifier of a message thread to which the message belongs; for supergroups only */ |
| 66 | - public null|int $message_thread_id = null; |
|
| 66 | + public null | int $message_thread_id = null; |
|
| 67 | 67 | |
| 68 | 68 | /** |
| 69 | 69 | * Optional. Sender of the message; empty for messages sent to channels. For backward compatibility, the field |
| 70 | 70 | * contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. |
| 71 | 71 | */ |
| 72 | - public null|user $from = null; |
|
| 72 | + public null | user $from = null; |
|
| 73 | 73 | |
| 74 | 74 | /** |
| 75 | 75 | * Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | * automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake |
| 78 | 78 | * sender user in non-channel chats, if the message was sent on behalf of a chat. |
| 79 | 79 | */ |
| 80 | - public null|chat $sender_chat = null; |
|
| 80 | + public null | chat $sender_chat = null; |
|
| 81 | 81 | |
| 82 | 82 | /** Date the message was sent in Unix time */ |
| 83 | 83 | public int $date; |
@@ -86,188 +86,188 @@ discard block |
||
| 86 | 86 | public chat $chat; |
| 87 | 87 | |
| 88 | 88 | /** Optional. For forwarded messages, sender of the original message */ |
| 89 | - public null|user $forward_from = null; |
|
| 89 | + public null | user $forward_from = null; |
|
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | 92 | * Optional. For messages forwarded from channels or from anonymous administrators, information about the |
| 93 | 93 | * original sender chat |
| 94 | 94 | */ |
| 95 | - public null|chat $forward_from_chat = null; |
|
| 95 | + public null | chat $forward_from_chat = null; |
|
| 96 | 96 | |
| 97 | 97 | /** Optional. For messages forwarded from channels, identifier of the original message in the channel */ |
| 98 | - public null|int $forward_from_message_id = null; |
|
| 98 | + public null | int $forward_from_message_id = null; |
|
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | 101 | * Optional. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, |
| 102 | 102 | * signature of the message sender if present |
| 103 | 103 | */ |
| 104 | - public null|string $forward_signature = null; |
|
| 104 | + public null | string $forward_signature = null; |
|
| 105 | 105 | |
| 106 | 106 | /** |
| 107 | 107 | * Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in |
| 108 | 108 | * forwarded messages |
| 109 | 109 | */ |
| 110 | - public null|string $forward_sender_name = null; |
|
| 110 | + public null | string $forward_sender_name = null; |
|
| 111 | 111 | |
| 112 | 112 | /** Optional. For forwarded messages, date the original message was sent in Unix time */ |
| 113 | - public null|int $forward_date = null; |
|
| 113 | + public null | int $forward_date = null; |
|
| 114 | 114 | |
| 115 | 115 | /** Optional. True, if the message is sent to a forum topic */ |
| 116 | - public null|bool $is_topic_message = null; |
|
| 116 | + public null | bool $is_topic_message = null; |
|
| 117 | 117 | |
| 118 | 118 | /** |
| 119 | 119 | * Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion |
| 120 | 120 | * group |
| 121 | 121 | */ |
| 122 | - public null|bool $is_automatic_forward = null; |
|
| 122 | + public null | bool $is_automatic_forward = null; |
|
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | 125 | * Optional. For replies, the original message. Note that the Message object in this field will not contain |
| 126 | 126 | * further reply_to_message fields even if it itself is a reply. |
| 127 | 127 | */ |
| 128 | - public null|message $reply_to_message = null; |
|
| 128 | + public null | message $reply_to_message = null; |
|
| 129 | 129 | |
| 130 | 130 | /** Optional. Bot through which the message was sent */ |
| 131 | - public null|user $via_bot = null; |
|
| 131 | + public null | user $via_bot = null; |
|
| 132 | 132 | |
| 133 | 133 | /** Optional. Date the message was last edited in Unix time */ |
| 134 | - public null|int $edit_date = null; |
|
| 134 | + public null | int $edit_date = null; |
|
| 135 | 135 | |
| 136 | 136 | /** Optional. True, if the message can't be forwarded */ |
| 137 | - public null|bool $has_protected_content = null; |
|
| 137 | + public null | bool $has_protected_content = null; |
|
| 138 | 138 | |
| 139 | 139 | /** Optional. The unique identifier of a media message group this message belongs to */ |
| 140 | - public null|string $media_group_id = null; |
|
| 140 | + public null | string $media_group_id = null; |
|
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | 143 | * Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group |
| 144 | 144 | * administrator |
| 145 | 145 | */ |
| 146 | - public null|string $author_signature = null; |
|
| 146 | + public null | string $author_signature = null; |
|
| 147 | 147 | |
| 148 | 148 | /** Optional. For text messages, the actual UTF-8 text of the message */ |
| 149 | - public null|string $text = null; |
|
| 149 | + public null | string $text = null; |
|
| 150 | 150 | |
| 151 | 151 | /** Optional. If user message was a commend , this parameter will be the commend */ |
| 152 | - public string|null $commend = null; |
|
| 152 | + public string | null $commend = null; |
|
| 153 | 153 | |
| 154 | 154 | /** Optional. If user message was a commend , this parameter will be the commend username(if exist) */ |
| 155 | - public string|null $commend_username = null; |
|
| 155 | + public string | null $commend_username = null; |
|
| 156 | 156 | |
| 157 | 157 | /** Optional. If user message was a commend , this parameter will be the commend payload(if exist) */ |
| 158 | - public string|null $commend_payload = null; |
|
| 158 | + public string | null $commend_payload = null; |
|
| 159 | 159 | |
| 160 | 160 | /** |
| 161 | 161 | * Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text |
| 162 | 162 | * @var messageEntity[] |
| 163 | 163 | */ |
| 164 | - public null|array $entities = null; |
|
| 164 | + public null | array $entities = null; |
|
| 165 | 165 | |
| 166 | 166 | /** |
| 167 | 167 | * Optional. Message is an animation, information about the animation. For backward compatibility, when this |
| 168 | 168 | * field is set, the document field will also be set |
| 169 | 169 | */ |
| 170 | - public null|animation $animation = null; |
|
| 170 | + public null | animation $animation = null; |
|
| 171 | 171 | |
| 172 | 172 | /** Optional. Message is an audio file, information about the file */ |
| 173 | - public null|audio $audio = null; |
|
| 173 | + public null | audio $audio = null; |
|
| 174 | 174 | |
| 175 | 175 | /** Optional. Message is a general file, information about the file */ |
| 176 | - public null|document $document = null; |
|
| 176 | + public null | document $document = null; |
|
| 177 | 177 | |
| 178 | 178 | /** |
| 179 | 179 | * Optional. Message is a photo, available sizes of the photo |
| 180 | 180 | * @var photoSize[] |
| 181 | 181 | */ |
| 182 | - public null|array $photo = null; |
|
| 182 | + public null | array $photo = null; |
|
| 183 | 183 | |
| 184 | 184 | /** Optional. Message is a sticker, information about the sticker */ |
| 185 | - public null|sticker $sticker = null; |
|
| 185 | + public null | sticker $sticker = null; |
|
| 186 | 186 | |
| 187 | 187 | /** Optional. Message is a video, information about the video */ |
| 188 | - public null|video $video = null; |
|
| 188 | + public null | video $video = null; |
|
| 189 | 189 | |
| 190 | 190 | /** Optional. Message is a video note, information about the video message */ |
| 191 | - public null|videoNote $video_note = null; |
|
| 191 | + public null | videoNote $video_note = null; |
|
| 192 | 192 | |
| 193 | 193 | /** Optional. Message is a voice message, information about the file */ |
| 194 | - public null|voice $voice = null; |
|
| 194 | + public null | voice $voice = null; |
|
| 195 | 195 | |
| 196 | 196 | /** Optional. Caption for the animation, audio, document, photo, video or voice */ |
| 197 | - public null|string $caption = null; |
|
| 197 | + public null | string $caption = null; |
|
| 198 | 198 | |
| 199 | 199 | /** |
| 200 | 200 | * Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear |
| 201 | 201 | * in the caption |
| 202 | 202 | * @var messageEntity[] |
| 203 | 203 | */ |
| 204 | - public null|array $caption_entities = null; |
|
| 204 | + public null | array $caption_entities = null; |
|
| 205 | 205 | |
| 206 | 206 | /** Optional. True, if the message media is covered by a spoiler animation */ |
| 207 | - public null|bool $has_media_spoiler = null; |
|
| 207 | + public null | bool $has_media_spoiler = null; |
|
| 208 | 208 | |
| 209 | 209 | /** Optional. Message is a shared contact, information about the contact */ |
| 210 | - public null|contact $contact = null; |
|
| 210 | + public null | contact $contact = null; |
|
| 211 | 211 | |
| 212 | 212 | /** Optional. Message is a dice with random value */ |
| 213 | - public null|dice $dice = null; |
|
| 213 | + public null | dice $dice = null; |
|
| 214 | 214 | |
| 215 | 215 | /** Optional. Message is a game, information about the game. More about games » */ |
| 216 | - public null|game $game = null; |
|
| 216 | + public null | game $game = null; |
|
| 217 | 217 | |
| 218 | 218 | /** Optional. Message is a native poll, information about the poll */ |
| 219 | - public null|poll $poll = null; |
|
| 219 | + public null | poll $poll = null; |
|
| 220 | 220 | |
| 221 | 221 | /** |
| 222 | 222 | * Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, |
| 223 | 223 | * the location field will also be set |
| 224 | 224 | */ |
| 225 | - public null|venue $venue = null; |
|
| 225 | + public null | venue $venue = null; |
|
| 226 | 226 | |
| 227 | 227 | /** Optional. Message is a shared location, information about the location */ |
| 228 | - public null|location $location = null; |
|
| 228 | + public null | location $location = null; |
|
| 229 | 229 | |
| 230 | 230 | /** |
| 231 | 231 | * Optional. New members that were added to the group or supergroup and information about them (the bot itself |
| 232 | 232 | * may be one of these members) |
| 233 | 233 | * @var user[] |
| 234 | 234 | */ |
| 235 | - public null|array $new_chat_members = null; |
|
| 235 | + public null | array $new_chat_members = null; |
|
| 236 | 236 | |
| 237 | 237 | /** Optional. A member was removed from the group, information about them (this member may be the bot itself) */ |
| 238 | - public null|user $left_chat_member = null; |
|
| 238 | + public null | user $left_chat_member = null; |
|
| 239 | 239 | |
| 240 | 240 | /** Optional. A chat title was changed to this value */ |
| 241 | - public null|string $new_chat_title = null; |
|
| 241 | + public null | string $new_chat_title = null; |
|
| 242 | 242 | |
| 243 | 243 | /** |
| 244 | 244 | * Optional. A chat photo was change to this value |
| 245 | 245 | * @var photoSize[] |
| 246 | 246 | */ |
| 247 | - public null|array $new_chat_photo = null; |
|
| 247 | + public null | array $new_chat_photo = null; |
|
| 248 | 248 | |
| 249 | 249 | /** Optional. Service message: the chat photo was deleted */ |
| 250 | - public null|bool $delete_chat_photo = null; |
|
| 250 | + public null | bool $delete_chat_photo = null; |
|
| 251 | 251 | |
| 252 | 252 | /** Optional. Service message: the group has been created */ |
| 253 | - public null|bool $group_chat_created = null; |
|
| 253 | + public null | bool $group_chat_created = null; |
|
| 254 | 254 | |
| 255 | 255 | /** |
| 256 | 256 | * Optional. Service message: the supergroup has been created. This field can't be received in a message coming |
| 257 | 257 | * through updates, because bot can't be a member of a supergroup when it is created. It can only be found in |
| 258 | 258 | * reply_to_message if someone replies to a very first message in a directly created supergroup. |
| 259 | 259 | */ |
| 260 | - public null|bool $supergroup_chat_created = null; |
|
| 260 | + public null | bool $supergroup_chat_created = null; |
|
| 261 | 261 | |
| 262 | 262 | /** |
| 263 | 263 | * Optional. Service message: the channel has been created. This field can't be received in a message coming |
| 264 | 264 | * through updates, because bot can't be a member of a channel when it is created. It can only be found in |
| 265 | 265 | * reply_to_message if someone replies to a very first message in a channel. |
| 266 | 266 | */ |
| 267 | - public null|bool $channel_chat_created = null; |
|
| 267 | + public null | bool $channel_chat_created = null; |
|
| 268 | 268 | |
| 269 | 269 | /** Optional. Service message: auto-delete timer settings changed in the chat */ |
| 270 | - public null|messageAutoDeleteTimerChanged $message_auto_delete_timer_changed = null; |
|
| 270 | + public null | messageAutoDeleteTimerChanged $message_auto_delete_timer_changed = null; |
|
| 271 | 271 | |
| 272 | 272 | /** |
| 273 | 273 | * Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | * But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for |
| 276 | 276 | * storing this identifier. |
| 277 | 277 | */ |
| 278 | - public null|int $migrate_to_chat_id = null; |
|
| 278 | + public null | int $migrate_to_chat_id = null; |
|
| 279 | 279 | |
| 280 | 280 | /** |
| 281 | 281 | * Optional. The supergroup has been migrated from a group with the specified identifier. This number may have |
@@ -283,82 +283,82 @@ discard block |
||
| 283 | 283 | * interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float |
| 284 | 284 | * type are safe for storing this identifier. |
| 285 | 285 | */ |
| 286 | - public null|int $migrate_from_chat_id = null; |
|
| 286 | + public null | int $migrate_from_chat_id = null; |
|
| 287 | 287 | |
| 288 | 288 | /** |
| 289 | 289 | * Optional. Specified message was pinned. Note that the Message object in this field will not contain further |
| 290 | 290 | * reply_to_message fields even if it is itself a reply. |
| 291 | 291 | */ |
| 292 | - public null|message $pinned_message = null; |
|
| 292 | + public null | message $pinned_message = null; |
|
| 293 | 293 | |
| 294 | 294 | /** Optional. Message is an invoice for a payment, information about the invoice. More about payments » */ |
| 295 | - public null|invoice $invoice = null; |
|
| 295 | + public null | invoice $invoice = null; |
|
| 296 | 296 | |
| 297 | 297 | /** |
| 298 | 298 | * Optional. Message is a service message about a successful payment, information about the payment. More about |
| 299 | 299 | * payments » |
| 300 | 300 | */ |
| 301 | - public null|successfulPayment $successful_payment = null; |
|
| 301 | + public null | successfulPayment $successful_payment = null; |
|
| 302 | 302 | |
| 303 | 303 | /** Optional. The domain name of the website on which the user has logged in. More about Telegram Login » */ |
| 304 | - public null|string $connected_website = null; |
|
| 304 | + public null | string $connected_website = null; |
|
| 305 | 305 | |
| 306 | 306 | /** Optional. Service message: the user allowed the bot added to the attachment menu to write messages */ |
| 307 | - public null|writeAccessAllowed $write_access_allowed = null; |
|
| 307 | + public null | writeAccessAllowed $write_access_allowed = null; |
|
| 308 | 308 | |
| 309 | 309 | /** Optional. Telegram Passport data */ |
| 310 | - public null|passportData $passport_data = null; |
|
| 310 | + public null | passportData $passport_data = null; |
|
| 311 | 311 | |
| 312 | 312 | /** |
| 313 | 313 | * Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live |
| 314 | 314 | * Location. |
| 315 | 315 | */ |
| 316 | - public null|proximityAlertTriggered $proximity_alert_triggered = null; |
|
| 316 | + public null | proximityAlertTriggered $proximity_alert_triggered = null; |
|
| 317 | 317 | |
| 318 | 318 | /** Optional. Service message: forum topic created */ |
| 319 | - public null|forumTopicCreated $forum_topic_created = null; |
|
| 319 | + public null | forumTopicCreated $forum_topic_created = null; |
|
| 320 | 320 | |
| 321 | 321 | /** Optional. Service message: forum topic edited */ |
| 322 | - public null|forumTopicEdited $forum_topic_edited = null; |
|
| 322 | + public null | forumTopicEdited $forum_topic_edited = null; |
|
| 323 | 323 | |
| 324 | 324 | /** Optional. Service message: forum topic closed */ |
| 325 | - public null|forumTopicClosed $forum_topic_closed = null; |
|
| 325 | + public null | forumTopicClosed $forum_topic_closed = null; |
|
| 326 | 326 | |
| 327 | 327 | /** Optional. Service message: forum topic reopened */ |
| 328 | - public null|forumTopicReopened $forum_topic_reopened = null; |
|
| 328 | + public null | forumTopicReopened $forum_topic_reopened = null; |
|
| 329 | 329 | |
| 330 | 330 | /** Optional. Service message: the 'General' forum topic hidden */ |
| 331 | - public null|generalForumTopicHidden $general_forum_topic_hidden = null; |
|
| 331 | + public null | generalForumTopicHidden $general_forum_topic_hidden = null; |
|
| 332 | 332 | |
| 333 | 333 | /** Optional. Service message: the 'General' forum topic unhidden */ |
| 334 | - public null|generalForumTopicUnhidden $general_forum_topic_unhidden = null; |
|
| 334 | + public null | generalForumTopicUnhidden $general_forum_topic_unhidden = null; |
|
| 335 | 335 | |
| 336 | 336 | /** Optional. Service message: video chat scheduled */ |
| 337 | - public null|videoChatScheduled $video_chat_scheduled = null; |
|
| 337 | + public null | videoChatScheduled $video_chat_scheduled = null; |
|
| 338 | 338 | |
| 339 | 339 | /** Optional. Service message: video chat started */ |
| 340 | - public null|videoChatStarted $video_chat_started = null; |
|
| 340 | + public null | videoChatStarted $video_chat_started = null; |
|
| 341 | 341 | |
| 342 | 342 | /** Optional. Service message: video chat ended */ |
| 343 | - public null|videoChatEnded $video_chat_ended = null; |
|
| 343 | + public null | videoChatEnded $video_chat_ended = null; |
|
| 344 | 344 | |
| 345 | 345 | /** Optional. Service message: new participants invited to a video chat */ |
| 346 | - public null|videoChatParticipantsInvited $video_chat_participants_invited = null; |
|
| 346 | + public null | videoChatParticipantsInvited $video_chat_participants_invited = null; |
|
| 347 | 347 | |
| 348 | 348 | /** Optional. Service message: data sent by a Web App */ |
| 349 | - public null|webAppData $web_app_data = null; |
|
| 349 | + public null | webAppData $web_app_data = null; |
|
| 350 | 350 | |
| 351 | 351 | /** Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. */ |
| 352 | - public null|inlineKeyboardMarkup $reply_markup = null; |
|
| 352 | + public null | inlineKeyboardMarkup $reply_markup = null; |
|
| 353 | 353 | |
| 354 | 354 | |
| 355 | - public function __construct(stdClass|null $object = null) { |
|
| 355 | + public function __construct(stdClass | null $object = null) { |
|
| 356 | 356 | if ($object != null) { |
| 357 | 357 | parent::__construct($object, self::subs); |
| 358 | 358 | } |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | - public function delete (): responseError|bool { |
|
| 362 | - return telegram::deleteMessage($this->chat->id,$this->id); |
|
| 361 | + public function delete(): responseError | bool { |
|
| 362 | + return telegram::deleteMessage($this->chat->id, $this->id); |
|
| 363 | 363 | } |
| 364 | 364 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | /** Keep all of properties which has sub properties */ |
| 12 | 12 | private const subs = []; |
| 13 | 13 | |
| 14 | - public function __construct(stdClass|null $object = null) { |
|
| 14 | + public function __construct(stdClass | null $object = null) { |
|
| 15 | 15 | if ($object != null) { |
| 16 | 16 | parent::__construct($object, self::subs); |
| 17 | 17 | } |
@@ -30,97 +30,97 @@ discard block |
||
| 30 | 30 | public string $type; |
| 31 | 31 | |
| 32 | 32 | /** Optional. Title, for supergroups, channels and group chats */ |
| 33 | - public null|string $title = null; |
|
| 33 | + public null | string $title = null; |
|
| 34 | 34 | |
| 35 | 35 | /** Optional. Username, for private chats, supergroups and channels if available */ |
| 36 | - public null|string $username = null; |
|
| 36 | + public null | string $username = null; |
|
| 37 | 37 | |
| 38 | 38 | /** Optional. First name of the other party in a private chat */ |
| 39 | - public null|string $first_name = null; |
|
| 39 | + public null | string $first_name = null; |
|
| 40 | 40 | |
| 41 | 41 | /** Optional. Last name of the other party in a private chat */ |
| 42 | - public null|string $last_name = null; |
|
| 42 | + public null | string $last_name = null; |
|
| 43 | 43 | |
| 44 | 44 | /** Optional. True, if the supergroup chat is a forum (has topics enabled) */ |
| 45 | - public null|bool $is_forum = null; |
|
| 45 | + public null | bool $is_forum = null; |
|
| 46 | 46 | |
| 47 | 47 | /** Optional. Chat photo. Returned only in getChat. */ |
| 48 | - public null|chatPhoto $photo = null; |
|
| 48 | + public null | chatPhoto $photo = null; |
|
| 49 | 49 | |
| 50 | 50 | /** Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat. */ |
| 51 | - public null|array $active_usernames = null; |
|
| 51 | + public null | array $active_usernames = null; |
|
| 52 | 52 | |
| 53 | 53 | /** Optional. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat. */ |
| 54 | - public null|string $emoji_status_custom_emoji_id = null; |
|
| 54 | + public null | string $emoji_status_custom_emoji_id = null; |
|
| 55 | 55 | |
| 56 | 56 | /** Optional. Bio of the other party in a private chat. Returned only in getChat. */ |
| 57 | - public null|string $bio = null; |
|
| 57 | + public null | string $bio = null; |
|
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | 60 | * Optional. True, if privacy settings of the other party in the private chat allows to use |
| 61 | 61 | * tg://user?id=<user_id> links only in chats with the user. Returned only in getChat. |
| 62 | 62 | */ |
| 63 | - public null|bool $has_private_forwards = null; |
|
| 63 | + public null | bool $has_private_forwards = null; |
|
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | 66 | * Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in |
| 67 | 67 | * the private chat. Returned only in getChat. |
| 68 | 68 | */ |
| 69 | - public null|bool $has_restricted_voice_and_video_messages = null; |
|
| 69 | + public null | bool $has_restricted_voice_and_video_messages = null; |
|
| 70 | 70 | |
| 71 | 71 | /** Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat. */ |
| 72 | - public null|bool $join_to_send_messages = null; |
|
| 72 | + public null | bool $join_to_send_messages = null; |
|
| 73 | 73 | |
| 74 | 74 | /** |
| 75 | 75 | * Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. |
| 76 | 76 | * Returned only in getChat. |
| 77 | 77 | */ |
| 78 | - public null|bool $join_by_request = null; |
|
| 78 | + public null | bool $join_by_request = null; |
|
| 79 | 79 | |
| 80 | 80 | /** Optional. Description, for groups, supergroups and channel chats. Returned only in getChat. */ |
| 81 | - public null|string $description = null; |
|
| 81 | + public null | string $description = null; |
|
| 82 | 82 | |
| 83 | 83 | /** Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat. */ |
| 84 | - public null|string $invite_link = null; |
|
| 84 | + public null | string $invite_link = null; |
|
| 85 | 85 | |
| 86 | 86 | /** Optional. The most recent pinned message (by sending date). Returned only in getChat. */ |
| 87 | - public null|message $pinned_message = null; |
|
| 87 | + public null | message $pinned_message = null; |
|
| 88 | 88 | |
| 89 | 89 | /** Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat. */ |
| 90 | - public null|chatPermissions $permissions = null; |
|
| 90 | + public null | chatPermissions $permissions = null; |
|
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | 93 | * Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged |
| 94 | 94 | * user; in seconds. Returned only in getChat. |
| 95 | 95 | */ |
| 96 | - public null|int $slow_mode_delay = null; |
|
| 96 | + public null | int $slow_mode_delay = null; |
|
| 97 | 97 | |
| 98 | 98 | /** |
| 99 | 99 | * Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. |
| 100 | 100 | * Returned only in getChat. |
| 101 | 101 | */ |
| 102 | - public null|int $message_auto_delete_time = null; |
|
| 102 | + public null | int $message_auto_delete_time = null; |
|
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | 105 | * Optional. True, if aggressive anti-spam checks are enabled in the supergroup. |
| 106 | 106 | * The field is only available to chat administrators. Returned only in getChat. |
| 107 | 107 | */ |
| 108 | - public null|bool $has_aggressive_anti_spam_enabled = null; |
|
| 108 | + public null | bool $has_aggressive_anti_spam_enabled = null; |
|
| 109 | 109 | |
| 110 | 110 | /** |
| 111 | 111 | * Optional. True, if non-administrators can only get the list of bots and administrators in the chat. |
| 112 | 112 | * Returned only in getChat. |
| 113 | 113 | */ |
| 114 | - public null|bool $has_hidden_members = null; |
|
| 114 | + public null | bool $has_hidden_members = null; |
|
| 115 | 115 | |
| 116 | 116 | /** Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat. */ |
| 117 | - public null|bool $has_protected_content = null; |
|
| 117 | + public null | bool $has_protected_content = null; |
|
| 118 | 118 | |
| 119 | 119 | /** Optional. For supergroups, name of group sticker set. Returned only in getChat. */ |
| 120 | - public null|string $sticker_set_name = null; |
|
| 120 | + public null | string $sticker_set_name = null; |
|
| 121 | 121 | |
| 122 | 122 | /** Optional. True, if the bot can change the group sticker set. Returned only in getChat. */ |
| 123 | - public null|bool $can_set_sticker_set = null; |
|
| 123 | + public null | bool $can_set_sticker_set = null; |
|
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | 126 | * Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice |
@@ -128,87 +128,87 @@ discard block |
||
| 128 | 128 | * languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed |
| 129 | 129 | * 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat. |
| 130 | 130 | */ |
| 131 | - public null|int $linked_chat_id = null; |
|
| 131 | + public null | int $linked_chat_id = null; |
|
| 132 | 132 | |
| 133 | 133 | /** Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat. */ |
| 134 | - public null|chatLocation $location = null; |
|
| 134 | + public null | chatLocation $location = null; |
|
| 135 | 135 | |
| 136 | 136 | |
| 137 | - public function __construct(stdClass|null $object = null) { |
|
| 137 | + public function __construct(stdClass | null $object = null) { |
|
| 138 | 138 | if ($object != null) { |
| 139 | 139 | parent::__construct($object, self::subs); |
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | - public function isPrivate (): bool { |
|
| 143 | + public function isPrivate(): bool { |
|
| 144 | 144 | return $this->type === chatType::PRIVATE; |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | - public function isGroup (): bool { |
|
| 147 | + public function isGroup(): bool { |
|
| 148 | 148 | return $this->type === chatType::GROUP; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | - public function isSuperGroup (): bool { |
|
| 151 | + public function isSuperGroup(): bool { |
|
| 152 | 152 | return $this->type === chatType::SUPERGROUP; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - public function isChannel (): bool { |
|
| 155 | + public function isChannel(): bool { |
|
| 156 | 156 | return $this->type === chatType::CHANNEL; |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - public function leave(): responseError|bool { |
|
| 159 | + public function leave(): responseError | bool { |
|
| 160 | 160 | if ($this->isPrivate()) { |
| 161 | 161 | return false; |
| 162 | 162 | } |
| 163 | 163 | return telegram::leave($this->id); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - public function setPhoto(CURLFile|array $photo): responseError|bool { |
|
| 166 | + public function setPhoto(CURLFile | array $photo): responseError | bool { |
|
| 167 | 167 | if ($this->isPrivate()) { |
| 168 | 168 | return false; |
| 169 | 169 | } |
| 170 | - return telegram::setChatPhoto($photo,$this->id); |
|
| 170 | + return telegram::setChatPhoto($photo, $this->id); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | - public function delPhoto(): responseError|bool { |
|
| 173 | + public function delPhoto(): responseError | bool { |
|
| 174 | 174 | if ($this->isPrivate()) { |
| 175 | 175 | return false; |
| 176 | 176 | } |
| 177 | 177 | return telegram::deleteChatPhoto($this->id); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - public function setTitle(string|array $title): responseError|bool { |
|
| 180 | + public function setTitle(string | array $title): responseError | bool { |
|
| 181 | 181 | if ($this->isPrivate()) { |
| 182 | 182 | return false; |
| 183 | 183 | } |
| 184 | - return telegram::setChatTitle($title,$this->id); |
|
| 184 | + return telegram::setChatTitle($title, $this->id); |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | - public function setDescription(string|null $description = null): responseError|bool { |
|
| 187 | + public function setDescription(string | null $description = null): responseError | bool { |
|
| 188 | 188 | if ($this->isPrivate()) { |
| 189 | 189 | return false; |
| 190 | 190 | } |
| 191 | - return telegram::setChatDescription($this->id,$description); |
|
| 191 | + return telegram::setChatDescription($this->id, $description); |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | - public function getAdmins(): bool|responseError|array { |
|
| 194 | + public function getAdmins(): bool | responseError | array { |
|
| 195 | 195 | if ($this->isPrivate()) { |
| 196 | 196 | return false; |
| 197 | 197 | } |
| 198 | 198 | return telegram::getChatAdministrators($this->id); |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | - public function getMembersCount(): bool|responseError|int { |
|
| 201 | + public function getMembersCount(): bool | responseError | int { |
|
| 202 | 202 | if ($this->isPrivate()) { |
| 203 | 203 | return false; |
| 204 | 204 | } |
| 205 | 205 | return telegram::getChatMemberCount($this->id); |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | - public function getMember(int|null $user_id = null): chatMember|bool|responseError { |
|
| 208 | + public function getMember(int | null $user_id = null): chatMember | bool | responseError { |
|
| 209 | 209 | if ($this->isPrivate()) { |
| 210 | 210 | return false; |
| 211 | 211 | } |
| 212 | - return telegram::getChatMember($this->id,$user_id); |
|
| 212 | + return telegram::getChatMember($this->id, $user_id); |
|
| 213 | 213 | } |
| 214 | 214 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | /** Keep all of properties which has sub properties */ |
| 12 | 12 | private const subs = []; |
| 13 | 13 | |
| 14 | - public function __construct(stdClass|null $object = null) { |
|
| 14 | + public function __construct(stdClass | null $object = null) { |
|
| 15 | 15 | if ($object != null) { |
| 16 | 16 | parent::__construct($object, self::subs); |
| 17 | 17 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | /** Keep all of properties which has sub properties */ |
| 12 | 12 | private const subs = []; |
| 13 | 13 | |
| 14 | - public function __construct(stdClass|null $object = null) { |
|
| 14 | + public function __construct(stdClass | null $object = null) { |
|
| 15 | 15 | if ($object != null) { |
| 16 | 16 | parent::__construct($object, self::subs); |
| 17 | 17 | } |