* Renamed namespace from \TgBotLib\Abstracts to \TgBotLib\Enums

* Updated class type to `final class` in `\TgBotLib\Enums > BotCommandScopeType`
 * Updated class type to `final class` in `\TgBotLib\Enums >  ChatActionType`
 * Updated class type to `final class` in `\TgBotLib\Enums > ChatMemberStatus`
 * Updated class type to `final class` in `\TgBotLib\Enums > ChatType`
 * Updated class type to `final class` in `\TgBotLib\Enums > EventType`
 * Updated class type to `final class` in `\TgBotLib\Enums > InlineQueryResultType`
 * Updated class type to `final class` in `\TgBotLib\Enums > InputMediaType`
 * Updated class type to `final class` in `\TgBotLib\Enums > InputButtonType`
 * Updated class type to `final class` in `\TgBotLib\Enums > MessageEntityType`
 * Updated class type to `final class` in `\TgBotLib\Enums > PassportElementType`
 * Updated class type to `final class` in `\TgBotLib\Enums > PollType`
 * Updated class type to `final class` in `\TgBotLib\Enums > StickerFormat`
 * Updated class type to `final class` in `\TgBotLib\Enums > StickerType`
 * Updated class type to `final class` in `\TgBotLib\Enums > ThumbnailMimeType`
 * Updated class type to `final class` in `\TgBotLib\Enums > UpdateEventType`
This commit is contained in:
Netkas 2023-08-09 15:32:45 -04:00
parent 176ea791bf
commit 5ec6f7271a
No known key found for this signature in database
GPG key ID: 5DAF58535614062B
56 changed files with 1279 additions and 332 deletions

View file

@ -0,0 +1,14 @@
<?php
namespace TgBotLib\Enums;
final class BotCommandScopeType
{
public const DEFAULT = 'default';
public const ALL_PRIVATE_CHATS = 'all_private_chats';
public const ALL_CHAT_GROUPS = 'all_group_chats';
public const ALL_CHAT_ADMINISTRATORS = 'all_chat_administrators';
public const CHAT = 'chat';
public const CHAT_ADMINISTRATORS = 'chat_administrators';
public const CHAT_MEMBER = 'chat_member';
}

View file

@ -0,0 +1,17 @@
<?php
namespace TgBotLib\Enums;
final class ChatActionType
{
public const TYPING = 'typing';
public const UPLOAD_PHOTO = 'upload_photo';
public const RECORD_VIDEO = 'record_video';
public const UPLOAD_VIDEO = 'upload_video';
public const RECORD_AUDIO = 'record_audio';
public const UPLOAD_AUDIO = 'upload_audio';
public const UPLOAD_DOCUMENT = 'upload_document';
public const FIND_LOCATION = 'find_location';
public const RECORD_VIDEO_NOTE = 'record_video_note';
public const UPLOAD_VIDEO_NOTE = 'upload_video_note';
}

View file

@ -0,0 +1,13 @@
<?php
namespace TgBotLib\Enums;
final class ChatMemberStatus
{
public const CREATOR = 'creator';
public const ADMINISTRATOR = 'administrator';
public const MEMBER = 'member';
public const RESTRICTED = 'restricted';
public const LEFT = 'left';
public const KICKED = 'kicked';
}

View file

@ -0,0 +1,11 @@
<?php
namespace TgBotLib\Enums;
final class ChatType
{
public const PRIVATE = 'private';
public const GROUP = 'group';
public const SUPERGROUP = 'supergroup';
public const CHANNEL = 'channel';
}

View file

@ -0,0 +1,43 @@
<?php
namespace TgBotLib\Enums;
final class EventType
{
public const GENERIC_UPDATE = 'generic_update';
public const MESSAGE = 'message';
public const EDITED_MESSAGE = 'edited_message';
public const GENERIC_COMMAND_MESSAGE = 'generic_command_message';
public const CHAT_MEMBER_JOINED = 'chat_member_joined';
public const CHAT_MEMBER_LEFT = 'chat_member_left';
public const CHAT_MEMBER_KICKED = 'chat_member_kicked';
public const CHAT_MEMBER_BANNED = 'chat_member_banned';
public const CHAT_MEMBER_UNBANNED = 'chat_member_unbanned';
public const CHAT_MEMBER_PROMOTED = 'chat_member_promoted';
public const CHAT_MEMBER_DEMOTED = 'chat_member_demoted';
public const CHAT_MEMBER_RESTRICTED = 'chat_member_restricted';
public const CHAT_MEMBER_UNRESTRICTED = 'chat_member_unrestricted';
public const CHAT_TITLE_CHANGED = 'chat_title_changed';
public const CHAT_PHOTO_CHANGED = 'chat_photo_changed';
public const CALLBACK_QUERY = 'callback_query';
public const All = [
self::GENERIC_UPDATE,
self::MESSAGE,
self::EDITED_MESSAGE,
self::GENERIC_COMMAND_MESSAGE,
self::CHAT_MEMBER_JOINED,
self::CHAT_MEMBER_LEFT,
self::CHAT_MEMBER_KICKED,
self::CHAT_MEMBER_BANNED,
self::CHAT_MEMBER_UNBANNED,
self::CHAT_MEMBER_PROMOTED,
self::CHAT_MEMBER_DEMOTED,
self::CHAT_MEMBER_RESTRICTED,
self::CHAT_MEMBER_UNRESTRICTED,
self::CHAT_TITLE_CHANGED,
self::CHAT_PHOTO_CHANGED,
self::CALLBACK_QUERY,
];
}

View file

@ -0,0 +1,81 @@
<?php
namespace TgBotLib\Enums;
final class InlineQueryResultType
{
/**
* @link https://core.telegram.org/bots/api#inlinequeryresultarticle
*/
public const ARTICLE = 'article';
/**
* @link https://core.telegram.org/bots/api#inlinequeryresultphoto
*/
public const PHOTO = 'photo';
/**
* @link https://core.telegram.org/bots/api#inlinequeryresultgif
*/
public const GIF = 'gif';
/**
* @link https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif
*/
public const MPEG_4_GIF = 'mpeg4_gif';
/**
* @link https://core.telegram.org/bots/api#inlinequeryresultvideompeg4
*/
public const VIDEO = 'video';
/**
* @link https://core.telegram.org/bots/api#inlinequeryresultaudio
*/
public const AUDIO = 'audio';
/**
* @link https://core.telegram.org/bots/api#inlinequeryresultvoice
*/
public const VOICE = 'voice';
/**
* @link https://core.telegram.org/bots/api#inlinequeryresultdocument
*/
public const DOCUMENT = 'document';
/**
* @link https://core.telegram.org/bots/api#inlinequeryresultlocation
*/
public const LOCATION = 'location';
/**
* @link https://core.telegram.org/bots/api#inlinequeryresultvenue
*/
public const VENUE = 'venue';
/**
* @link https://core.telegram.org/bots/api#inlinequeryresultcontact
*/
public const CONTACT = 'contact';
/**
* @link https://core.telegram.org/bots/api#inlinequeryresultgame
*/
public const GAME = 'game';
public const ALL = [
self::ARTICLE,
self::PHOTO,
self::GIF,
self::MPEG_4_GIF,
self::VIDEO,
self::AUDIO,
self::VOICE,
self::DOCUMENT,
self::LOCATION,
self::VENUE,
self::CONTACT,
self::GAME,
];
}

View file

@ -0,0 +1,12 @@
<?php
namespace TgBotLib\Enums;
final class InputMediaType
{
public const PHOTO = 'photo';
public const VIDEO = 'video';
public const ANIMATION = 'animation';
public const AUDIO = 'audio';
public const DOCUMENT = 'document';
}

View file

@ -0,0 +1,10 @@
<?php
namespace TgBotLib\Enums;
final class MenuButtonType
{
public const COMMANDS = 'commands';
public const WEB_APP = 'web_app';
public const DEFAULT = 'default';
}

View file

@ -0,0 +1,41 @@
<?php
namespace TgBotLib\Enums;
final class MessageEntityType
{
public const MENTION = 'mention';
public const HASHTAG = 'hashtag';
public const CASHTAG = 'cashtag';
public const BOT_COMMAND = 'bot_command';
public const URL = 'url';
public const EMAIL = 'email';
public const PHONE_NUMBER = 'phone_number';
public const BOLD = 'bold';
public const ITALIC = 'italic';
public const UNDERLINE = 'underline';
public const STRIKETHROUGH = 'strikethrough';
public const SPOILER = 'spoiler';
public const CODE = 'code';
public const PRE = 'pre';
public const TEXT_LINK = 'text_link';
public const TEXT_MENTION = 'text_mention';
public const CUSTOM_EMOJI = 'custom_emoji';
}

View file

@ -0,0 +1,20 @@
<?php
namespace TgBotLib\Enums;
final class PassportElementType
{
public const PERSONAL_DETAILS = 'personal_details';
public const PASSPORT = 'passport';
public const DRIVER_LICENSE = 'driver_license';
public const IDENTITY_CARD = 'identity_card';
public const INTERNAL_PASSPORT = 'internal_passport';
public const ADDRESS = 'address';
public const UTILITY_BILL = 'utility_bill';
public const BANK_STATEMENT = 'bank_statement';
public const RENTAL_AGREEMENT = 'rental_agreement';
public const PASSPORT_REGISTRATION = 'passport_registration';
public const TEMPORARY_REGISTRATION = 'temporary_registration';
public const PHONE_NUMBER = 'phone_number';
public const EMAIL = 'email';
}

View file

@ -0,0 +1,10 @@
<?php
namespace TgBotLib\Enums;
final class PollType
{
public const REGULAR = 'regular';
public const QUIZ = 'quiz';
}

View file

@ -0,0 +1,10 @@
<?php
namespace TgBotLib\Enums;
final class StickerFormat
{
public const STATIC = 'static';
public const ANIMATED = 'animated';
public const VIDEO = 'video';
}

View file

@ -0,0 +1,12 @@
<?php
namespace TgBotLib\Enums;
final class StickerType
{
public const REGULAR = 'regular';
public const MASK = 'mask';
public const CUSTOM_EMOJI = 'custom_emoji';
}

View file

@ -0,0 +1,10 @@
<?php
namespace TgBotLib\Enums;
final class ThumbnailMimeType
{
public const IMAGE_JPEG = 'image/jpeg';
public const IMAGE_GIF = 'image/gif';
public const VIDEO_MP4 = 'video/mp4';
}

View file

@ -0,0 +1,12 @@
<?php
namespace TgBotLib\Enums;
final class UpdateEventType
{
public const GENERIC_UPDATE = 'generic_update';
public const MESSAGE = 'message';
public const EDITED_MESSAGE = 'edited_message';
}