* 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:
parent
176ea791bf
commit
5ec6f7271a
56 changed files with 1279 additions and 332 deletions
14
src/TgBotLib/Enums/BotCommandScopeType.php
Normal file
14
src/TgBotLib/Enums/BotCommandScopeType.php
Normal 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';
|
||||
}
|
17
src/TgBotLib/Enums/ChatActionType.php
Normal file
17
src/TgBotLib/Enums/ChatActionType.php
Normal 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';
|
||||
}
|
13
src/TgBotLib/Enums/ChatMemberStatus.php
Normal file
13
src/TgBotLib/Enums/ChatMemberStatus.php
Normal 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';
|
||||
}
|
11
src/TgBotLib/Enums/ChatType.php
Normal file
11
src/TgBotLib/Enums/ChatType.php
Normal 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';
|
||||
}
|
43
src/TgBotLib/Enums/EventType.php
Normal file
43
src/TgBotLib/Enums/EventType.php
Normal 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,
|
||||
];
|
||||
|
||||
}
|
81
src/TgBotLib/Enums/InlineQueryResultType.php
Normal file
81
src/TgBotLib/Enums/InlineQueryResultType.php
Normal 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,
|
||||
];
|
||||
}
|
12
src/TgBotLib/Enums/InputMediaType.php
Normal file
12
src/TgBotLib/Enums/InputMediaType.php
Normal 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';
|
||||
}
|
10
src/TgBotLib/Enums/MenuButtonType.php
Normal file
10
src/TgBotLib/Enums/MenuButtonType.php
Normal 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';
|
||||
}
|
41
src/TgBotLib/Enums/MessageEntityType.php
Normal file
41
src/TgBotLib/Enums/MessageEntityType.php
Normal 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';
|
||||
|
||||
}
|
20
src/TgBotLib/Enums/PassportElementType.php
Normal file
20
src/TgBotLib/Enums/PassportElementType.php
Normal 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';
|
||||
}
|
10
src/TgBotLib/Enums/PollType.php
Normal file
10
src/TgBotLib/Enums/PollType.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
|
||||
final class PollType
|
||||
{
|
||||
public const REGULAR = 'regular';
|
||||
|
||||
public const QUIZ = 'quiz';
|
||||
}
|
10
src/TgBotLib/Enums/StickerFormat.php
Normal file
10
src/TgBotLib/Enums/StickerFormat.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
|
||||
final class StickerFormat
|
||||
{
|
||||
public const STATIC = 'static';
|
||||
public const ANIMATED = 'animated';
|
||||
public const VIDEO = 'video';
|
||||
}
|
12
src/TgBotLib/Enums/StickerType.php
Normal file
12
src/TgBotLib/Enums/StickerType.php
Normal 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';
|
||||
}
|
10
src/TgBotLib/Enums/ThumbnailMimeType.php
Normal file
10
src/TgBotLib/Enums/ThumbnailMimeType.php
Normal 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';
|
||||
}
|
12
src/TgBotLib/Enums/UpdateEventType.php
Normal file
12
src/TgBotLib/Enums/UpdateEventType.php
Normal 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';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue