From 6c67e97a4b57a3d089cd96a641fa388e878673a2 Mon Sep 17 00:00:00 2001 From: netkas Date: Wed, 2 Oct 2024 00:18:12 -0400 Subject: [PATCH] Moved Objects --- README.md | 12 ++-- src/TgBotLib/BotOld.php | 60 +++++++++---------- src/TgBotLib/Interfaces/CommandInterface.php | 2 +- src/TgBotLib/Interfaces/EventInterface.php | 2 +- src/TgBotLib/Methods/GetMe.php | 2 +- src/TgBotLib/Methods/SendMessage.php | 2 +- .../Objects/{Telegram => }/Animation.php | 2 +- src/TgBotLib/Objects/{Telegram => }/Audio.php | 2 +- .../Objects/{Telegram => }/BackgroundFill.php | 8 +-- .../BackgroundFillFreeformGradient.php | 4 +- .../BackgroundFill/BackgroundFillGradient.php | 4 +- .../BackgroundFill/BackgroundFillSolid.php | 4 +- .../Objects/{Telegram => }/BackgroundType.php | 10 ++-- .../BackgroundTypeChatTheme.php | 4 +- .../BackgroundType/BackgroundTypeFill.php | 6 +- .../BackgroundType/BackgroundTypePattern.php | 8 +-- .../BackgroundTypeWallpaper.php | 6 +- .../Objects/{Telegram => }/BotCommand.php | 2 +- .../{Telegram => }/BotCommandScope.php | 8 +-- .../BotCommandScopeAllChatAdministrators.php | 4 +- .../BotCommandScopeAllGroupChats.php | 4 +- .../BotCommandScopeAllPrivateChats.php | 4 +- .../BotCommandScope/BotCommandScopeChat.php | 4 +- .../BotCommandScopeChatAdministrators.php | 4 +- .../BotCommandScopeChatMember.php | 4 +- .../BotCommandScopeDefault.php | 4 +- .../Objects/{Telegram => }/BotDescription.php | 2 +- .../{Telegram => }/BotShortDescription.php | 2 +- .../Objects/{Telegram => }/CallbackGame.php | 2 +- .../Objects/{Telegram => }/CallbackQuery.php | 2 +- src/TgBotLib/Objects/{Telegram => }/Chat.php | 2 +- .../ChatAdministratorRights.php | 2 +- .../Objects/{Telegram => }/ChatBackground.php | 2 +- .../Objects/{Telegram => }/ChatBoostAdded.php | 2 +- .../Objects/{Telegram => }/ChatInviteLink.php | 2 +- .../{Telegram => }/ChatJoinRequest.php | 2 +- .../Objects/{Telegram => }/ChatLocation.php | 2 +- .../Objects/{Telegram => }/ChatMember.php | 2 +- .../ChatMember/ChatMemberAdministrator.php | 6 +- .../ChatMember/ChatMemberBanned.php | 6 +- .../ChatMember/ChatMemberLeft.php | 6 +- .../ChatMember/ChatMemberMember.php | 6 +- .../ChatMember/ChatMemberOwner.php | 6 +- .../ChatMember/ChatMemberRestricted.php | 6 +- .../{Telegram => }/ChatMemberUpdated.php | 2 +- .../{Telegram => }/ChatPermissions.php | 2 +- .../Objects/{Telegram => }/ChatPhoto.php | 2 +- .../Objects/{Telegram => }/ChatShared.php | 2 +- .../{Telegram => }/ChosenInlineResult.php | 2 +- .../Objects/{Telegram => }/Contact.php | 2 +- src/TgBotLib/Objects/{Telegram => }/Dice.php | 2 +- .../Objects/{Telegram => }/Document.php | 2 +- .../{Telegram => }/EncryptedCredentials.php | 2 +- .../EncryptedPassportElement.php | 2 +- .../{Telegram => }/ExternalReplyInfo.php | 2 +- src/TgBotLib/Objects/{Telegram => }/File.php | 2 +- .../Objects/{Telegram => }/ForceReply.php | 2 +- .../Objects/{Telegram => }/ForumTopic.php | 2 +- .../{Telegram => }/ForumTopicClosed.php | 2 +- .../{Telegram => }/ForumTopicCreated.php | 2 +- .../{Telegram => }/ForumTopicEdited.php | 2 +- .../{Telegram => }/ForumTopicReopened.php | 2 +- src/TgBotLib/Objects/{Telegram => }/Game.php | 2 +- .../GeneralForumTopicHidden.php | 2 +- .../GeneralForumTopicUnhidden.php | 2 +- .../Objects/{Telegram => }/Giveaway.php | 2 +- .../{Telegram => }/GiveawayCompleted.php | 2 +- .../{Telegram => }/GiveawayCreated.php | 2 +- .../{Telegram => }/GiveawayWinners.php | 2 +- .../{Telegram => }/InaccessibleMessage.php | 2 +- .../{Telegram => }/InlineKeyboardButton.php | 2 +- .../{Telegram => }/InlineKeyboardMarkup.php | 2 +- .../Objects/{Telegram => }/InlineQuery.php | 2 +- .../{Telegram => }/InlineQueryResult.php | 26 ++++---- .../InlineQueryResultArticle.php | 14 ++--- .../InlineQueryResultAudio.php | 16 ++--- .../InlineQueryResultContact.php | 16 ++--- .../InlineQueryResultDocument.php | 16 ++--- .../InlineQueryResultGame.php | 4 +- .../InlineQueryResultGif.php | 16 ++--- .../InlineQueryResultLocation.php | 14 ++--- .../InlineQueryResultMpeg4Gif.php | 16 ++--- .../InlineQueryResultPhoto.php | 16 ++--- .../InlineQueryResultVenue.php | 14 ++--- .../InlineQueryResultVideo.php | 18 +++--- .../InlineQueryResultVoice.php | 18 +++--- .../Objects/{Telegram => }/InputMedia.php | 2 +- .../InputMedia/InputMediaAnimation.php | 6 +- .../InputMedia/InputMediaAudio.php | 6 +- .../InputMedia/InputMediaDocument.php | 6 +- .../InputMedia/InputMediaPhoto.php | 6 +- .../InputMedia/InputMediaVideo.php | 6 +- .../{Telegram => }/InputMessageContent.php | 12 ++-- .../InputContactMessageContent.php | 2 +- .../InputInvoiceMessageContent.php | 4 +- .../InputLocationMessageContent.php | 2 +- .../InputTextMessageContent.php | 4 +- .../InputVenueMessageContent.php | 2 +- .../Objects/{Telegram => }/Invoice.php | 2 +- .../Objects/{Telegram => }/KeyboardButton.php | 2 +- .../{Telegram => }/KeyboardButtonPollType.php | 2 +- .../KeyboardButtonRequestChat.php | 2 +- .../KeyboardButtonRequestUser.php | 2 +- .../Objects/{Telegram => }/LabeledPrice.php | 2 +- .../{Telegram => }/LinkPreviewOptions.php | 2 +- .../Objects/{Telegram => }/Location.php | 2 +- .../Objects/{Telegram => }/LoginUrl.php | 2 +- .../Objects/{Telegram => }/MaskPosition.php | 2 +- .../MaybeInaccessibleMessage.php | 2 +- .../Objects/{Telegram => }/MenuButton.php | 2 +- .../MenuButton/MenuButtonCommands.php | 4 +- .../MenuButton/MenuButtonDefault.php | 4 +- .../MenuButton/MenuButtonWebApp.php | 6 +- .../Objects/{Telegram => }/Message.php | 2 +- .../MessageAutoDeleteTimerChanged.php | 2 +- .../Objects/{Telegram => }/MessageEntity.php | 2 +- .../Objects/{Telegram => }/MessageOrigin.php | 10 ++-- .../MessageOrigin/MessageOriginChannel.php | 6 +- .../MessageOrigin/MessageOriginChat.php | 6 +- .../MessageOrigin/MessageOriginHiddenUser.php | 5 +- .../MessageOrigin/MessageOriginUser.php | 6 +- .../Objects/{Telegram => }/OrderInfo.php | 2 +- .../Objects/{Telegram => }/PaidMedia.php | 8 +-- .../PaidMedia/PaidMediaPhoto.php | 6 +- .../PaidMedia/PaidMediaPreview.php | 4 +- .../PaidMedia/PaidMediaVideo.php | 6 +- .../Objects/{Telegram => }/PaidMediaInfo.php | 2 +- .../Objects/{Telegram => }/PassportData.php | 2 +- .../Objects/{Telegram => }/PassportFile.php | 2 +- .../Objects/{Telegram => }/PhotoSize.php | 2 +- src/TgBotLib/Objects/{Telegram => }/Poll.php | 2 +- .../Objects/{Telegram => }/PollAnswer.php | 2 +- .../Objects/{Telegram => }/PollOption.php | 2 +- .../{Telegram => }/PreCheckoutQuery.php | 2 +- .../ProximityAlertTriggered.php | 2 +- .../{Telegram => }/RefundedPayment.php | 2 +- .../{Telegram => }/ReplyKeyboardMarkup.php | 2 +- .../{Telegram => }/ReplyKeyboardRemove.php | 2 +- .../{Telegram => }/ResponseParameters.php | 2 +- .../{Telegram => }/SentWebAppMessage.php | 2 +- .../{Telegram => }/ShippingAddress.php | 2 +- .../Objects/{Telegram => }/ShippingOption.php | 2 +- .../Objects/{Telegram => }/ShippingQuery.php | 2 +- .../Objects/{Telegram => }/Sticker.php | 2 +- .../Objects/{Telegram => }/StickerSet.php | 2 +- src/TgBotLib/Objects/{Telegram => }/Story.php | 2 +- .../{Telegram => }/SuccessfulPayment.php | 2 +- .../Objects/{Telegram => }/TextQuote.php | 2 +- .../Objects/{Telegram => }/Update.php | 2 +- src/TgBotLib/Objects/{Telegram => }/User.php | 2 +- .../{Telegram => }/UserProfilePhotos.php | 2 +- .../Objects/{Telegram => }/UsersShared.php | 2 +- src/TgBotLib/Objects/{Telegram => }/Venue.php | 2 +- src/TgBotLib/Objects/{Telegram => }/Video.php | 2 +- .../Objects/{Telegram => }/VideoChatEnded.php | 2 +- .../VideoChatParticipantsInvited.php | 2 +- .../{Telegram => }/VideoChatScheduled.php | 2 +- .../{Telegram => }/VideoChatStarted.php | 2 +- .../Objects/{Telegram => }/VideoNote.php | 2 +- src/TgBotLib/Objects/{Telegram => }/Voice.php | 2 +- .../Objects/{Telegram => }/WebAppData.php | 2 +- .../Objects/{Telegram => }/WebAppInfo.php | 2 +- .../Objects/{Telegram => }/WebhookInfo.php | 2 +- .../{Telegram => }/WriteAccessAllowed.php | 2 +- tests/TgBotLib/Methods/GetMeTest.php | 2 +- tests/commands/HashCommand.php | 2 +- tests/commands/StartCommand.php | 2 +- 167 files changed, 368 insertions(+), 373 deletions(-) rename src/TgBotLib/Objects/{Telegram => }/Animation.php (99%) rename src/TgBotLib/Objects/{Telegram => }/Audio.php (99%) rename src/TgBotLib/Objects/{Telegram => }/BackgroundFill.php (82%) rename src/TgBotLib/Objects/{Telegram => }/BackgroundFill/BackgroundFillFreeformGradient.php (90%) rename src/TgBotLib/Objects/{Telegram => }/BackgroundFill/BackgroundFillGradient.php (93%) rename src/TgBotLib/Objects/{Telegram => }/BackgroundFill/BackgroundFillSolid.php (89%) rename src/TgBotLib/Objects/{Telegram => }/BackgroundType.php (81%) rename src/TgBotLib/Objects/{Telegram => }/BackgroundType/BackgroundTypeChatTheme.php (90%) rename src/TgBotLib/Objects/{Telegram => }/BackgroundType/BackgroundTypeFill.php (89%) rename src/TgBotLib/Objects/{Telegram => }/BackgroundType/BackgroundTypePattern.php (92%) rename src/TgBotLib/Objects/{Telegram => }/BackgroundType/BackgroundTypeWallpaper.php (93%) rename src/TgBotLib/Objects/{Telegram => }/BotCommand.php (97%) rename src/TgBotLib/Objects/{Telegram => }/BotCommandScope.php (90%) rename src/TgBotLib/Objects/{Telegram => }/BotCommandScope/BotCommandScopeAllChatAdministrators.php (95%) rename src/TgBotLib/Objects/{Telegram => }/BotCommandScope/BotCommandScopeAllGroupChats.php (93%) rename src/TgBotLib/Objects/{Telegram => }/BotCommandScope/BotCommandScopeAllPrivateChats.php (93%) rename src/TgBotLib/Objects/{Telegram => }/BotCommandScope/BotCommandScopeChat.php (95%) rename src/TgBotLib/Objects/{Telegram => }/BotCommandScope/BotCommandScopeChatAdministrators.php (93%) rename src/TgBotLib/Objects/{Telegram => }/BotCommandScope/BotCommandScopeChatMember.php (95%) rename src/TgBotLib/Objects/{Telegram => }/BotCommandScope/BotCommandScopeDefault.php (93%) rename src/TgBotLib/Objects/{Telegram => }/BotDescription.php (96%) rename src/TgBotLib/Objects/{Telegram => }/BotShortDescription.php (96%) rename src/TgBotLib/Objects/{Telegram => }/CallbackGame.php (94%) rename src/TgBotLib/Objects/{Telegram => }/CallbackQuery.php (99%) rename src/TgBotLib/Objects/{Telegram => }/Chat.php (99%) rename src/TgBotLib/Objects/{Telegram => }/ChatAdministratorRights.php (99%) rename src/TgBotLib/Objects/{Telegram => }/ChatBackground.php (95%) rename src/TgBotLib/Objects/{Telegram => }/ChatBoostAdded.php (94%) rename src/TgBotLib/Objects/{Telegram => }/ChatInviteLink.php (99%) rename src/TgBotLib/Objects/{Telegram => }/ChatJoinRequest.php (98%) rename src/TgBotLib/Objects/{Telegram => }/ChatLocation.php (97%) rename src/TgBotLib/Objects/{Telegram => }/ChatMember.php (99%) rename src/TgBotLib/Objects/{Telegram => }/ChatMember/ChatMemberAdministrator.php (98%) rename src/TgBotLib/Objects/{Telegram => }/ChatMember/ChatMemberBanned.php (94%) rename src/TgBotLib/Objects/{Telegram => }/ChatMember/ChatMemberLeft.php (93%) rename src/TgBotLib/Objects/{Telegram => }/ChatMember/ChatMemberMember.php (93%) rename src/TgBotLib/Objects/{Telegram => }/ChatMember/ChatMemberOwner.php (95%) rename src/TgBotLib/Objects/{Telegram => }/ChatMember/ChatMemberRestricted.php (98%) rename src/TgBotLib/Objects/{Telegram => }/ChatMemberUpdated.php (99%) rename src/TgBotLib/Objects/{Telegram => }/ChatPermissions.php (99%) rename src/TgBotLib/Objects/{Telegram => }/ChatPhoto.php (98%) rename src/TgBotLib/Objects/{Telegram => }/ChatShared.php (97%) rename src/TgBotLib/Objects/{Telegram => }/ChosenInlineResult.php (98%) rename src/TgBotLib/Objects/{Telegram => }/Contact.php (98%) rename src/TgBotLib/Objects/{Telegram => }/Dice.php (96%) rename src/TgBotLib/Objects/{Telegram => }/Document.php (98%) rename src/TgBotLib/Objects/{Telegram => }/EncryptedCredentials.php (98%) rename src/TgBotLib/Objects/{Telegram => }/EncryptedPassportElement.php (99%) rename src/TgBotLib/Objects/{Telegram => }/ExternalReplyInfo.php (99%) rename src/TgBotLib/Objects/{Telegram => }/File.php (98%) rename src/TgBotLib/Objects/{Telegram => }/ForceReply.php (98%) rename src/TgBotLib/Objects/{Telegram => }/ForumTopic.php (98%) rename src/TgBotLib/Objects/{Telegram => }/ForumTopicClosed.php (94%) rename src/TgBotLib/Objects/{Telegram => }/ForumTopicCreated.php (97%) rename src/TgBotLib/Objects/{Telegram => }/ForumTopicEdited.php (97%) rename src/TgBotLib/Objects/{Telegram => }/ForumTopicReopened.php (94%) rename src/TgBotLib/Objects/{Telegram => }/Game.php (99%) rename src/TgBotLib/Objects/{Telegram => }/GeneralForumTopicHidden.php (94%) rename src/TgBotLib/Objects/{Telegram => }/GeneralForumTopicUnhidden.php (94%) rename src/TgBotLib/Objects/{Telegram => }/Giveaway.php (99%) rename src/TgBotLib/Objects/{Telegram => }/GiveawayCompleted.php (98%) rename src/TgBotLib/Objects/{Telegram => }/GiveawayCreated.php (95%) rename src/TgBotLib/Objects/{Telegram => }/GiveawayWinners.php (99%) rename src/TgBotLib/Objects/{Telegram => }/InaccessibleMessage.php (96%) rename src/TgBotLib/Objects/{Telegram => }/InlineKeyboardButton.php (99%) rename src/TgBotLib/Objects/{Telegram => }/InlineKeyboardMarkup.php (98%) rename src/TgBotLib/Objects/{Telegram => }/InlineQuery.php (98%) rename src/TgBotLib/Objects/{Telegram => }/InlineQueryResult.php (72%) rename src/TgBotLib/Objects/{Telegram => }/InlineQueryResult/InlineQueryResultArticle.php (95%) rename src/TgBotLib/Objects/{Telegram => }/InlineQueryResult/InlineQueryResultAudio.php (95%) rename src/TgBotLib/Objects/{Telegram => }/InlineQueryResult/InlineQueryResultContact.php (94%) rename src/TgBotLib/Objects/{Telegram => }/InlineQueryResult/InlineQueryResultDocument.php (96%) rename src/TgBotLib/Objects/{Telegram => }/InlineQueryResult/InlineQueryResultGame.php (96%) rename src/TgBotLib/Objects/{Telegram => }/InlineQueryResult/InlineQueryResultGif.php (96%) rename src/TgBotLib/Objects/{Telegram => }/InlineQueryResult/InlineQueryResultLocation.php (96%) rename src/TgBotLib/Objects/{Telegram => }/InlineQueryResult/InlineQueryResultMpeg4Gif.php (95%) rename src/TgBotLib/Objects/{Telegram => }/InlineQueryResult/InlineQueryResultPhoto.php (95%) rename src/TgBotLib/Objects/{Telegram => }/InlineQueryResult/InlineQueryResultVenue.php (96%) rename src/TgBotLib/Objects/{Telegram => }/InlineQueryResult/InlineQueryResultVideo.php (95%) rename src/TgBotLib/Objects/{Telegram => }/InlineQueryResult/InlineQueryResultVoice.php (81%) rename src/TgBotLib/Objects/{Telegram => }/InputMedia.php (99%) rename src/TgBotLib/Objects/{Telegram => }/InputMedia/InputMediaAnimation.php (98%) rename src/TgBotLib/Objects/{Telegram => }/InputMedia/InputMediaAudio.php (97%) rename src/TgBotLib/Objects/{Telegram => }/InputMedia/InputMediaDocument.php (97%) rename src/TgBotLib/Objects/{Telegram => }/InputMedia/InputMediaPhoto.php (97%) rename src/TgBotLib/Objects/{Telegram => }/InputMedia/InputMediaVideo.php (98%) rename src/TgBotLib/Objects/{Telegram => }/InputMessageContent.php (81%) rename src/TgBotLib/Objects/{Telegram => }/InputMessageContent/InputContactMessageContent.php (98%) rename src/TgBotLib/Objects/{Telegram => }/InputMessageContent/InputInvoiceMessageContent.php (99%) rename src/TgBotLib/Objects/{Telegram => }/InputMessageContent/InputLocationMessageContent.php (99%) rename src/TgBotLib/Objects/{Telegram => }/InputMessageContent/InputTextMessageContent.php (98%) rename src/TgBotLib/Objects/{Telegram => }/InputMessageContent/InputVenueMessageContent.php (99%) rename src/TgBotLib/Objects/{Telegram => }/Invoice.php (98%) rename src/TgBotLib/Objects/{Telegram => }/KeyboardButton.php (99%) rename src/TgBotLib/Objects/{Telegram => }/KeyboardButtonPollType.php (96%) rename src/TgBotLib/Objects/{Telegram => }/KeyboardButtonRequestChat.php (99%) rename src/TgBotLib/Objects/{Telegram => }/KeyboardButtonRequestUser.php (98%) rename src/TgBotLib/Objects/{Telegram => }/LabeledPrice.php (97%) rename src/TgBotLib/Objects/{Telegram => }/LinkPreviewOptions.php (98%) rename src/TgBotLib/Objects/{Telegram => }/Location.php (98%) rename src/TgBotLib/Objects/{Telegram => }/LoginUrl.php (98%) rename src/TgBotLib/Objects/{Telegram => }/MaskPosition.php (98%) rename src/TgBotLib/Objects/{Telegram => }/MaybeInaccessibleMessage.php (96%) rename src/TgBotLib/Objects/{Telegram => }/MenuButton.php (98%) rename src/TgBotLib/Objects/{Telegram => }/MenuButton/MenuButtonCommands.php (93%) rename src/TgBotLib/Objects/{Telegram => }/MenuButton/MenuButtonDefault.php (93%) rename src/TgBotLib/Objects/{Telegram => }/MenuButton/MenuButtonWebApp.php (94%) rename src/TgBotLib/Objects/{Telegram => }/Message.php (99%) rename src/TgBotLib/Objects/{Telegram => }/MessageAutoDeleteTimerChanged.php (96%) rename src/TgBotLib/Objects/{Telegram => }/MessageEntity.php (99%) rename src/TgBotLib/Objects/{Telegram => }/MessageOrigin.php (85%) rename src/TgBotLib/Objects/{Telegram => }/MessageOrigin/MessageOriginChannel.php (92%) rename src/TgBotLib/Objects/{Telegram => }/MessageOrigin/MessageOriginChat.php (91%) rename src/TgBotLib/Objects/{Telegram => }/MessageOrigin/MessageOriginHiddenUser.php (88%) rename src/TgBotLib/Objects/{Telegram => }/MessageOrigin/MessageOriginUser.php (88%) rename src/TgBotLib/Objects/{Telegram => }/OrderInfo.php (98%) rename src/TgBotLib/Objects/{Telegram => }/PaidMedia.php (82%) rename src/TgBotLib/Objects/{Telegram => }/PaidMedia/PaidMediaPhoto.php (89%) rename src/TgBotLib/Objects/{Telegram => }/PaidMedia/PaidMediaPreview.php (94%) rename src/TgBotLib/Objects/{Telegram => }/PaidMedia/PaidMediaVideo.php (86%) rename src/TgBotLib/Objects/{Telegram => }/PaidMediaInfo.php (97%) rename src/TgBotLib/Objects/{Telegram => }/PassportData.php (98%) rename src/TgBotLib/Objects/{Telegram => }/PassportFile.php (98%) rename src/TgBotLib/Objects/{Telegram => }/PhotoSize.php (98%) rename src/TgBotLib/Objects/{Telegram => }/Poll.php (99%) rename src/TgBotLib/Objects/{Telegram => }/PollAnswer.php (98%) rename src/TgBotLib/Objects/{Telegram => }/PollOption.php (97%) rename src/TgBotLib/Objects/{Telegram => }/PreCheckoutQuery.php (99%) rename src/TgBotLib/Objects/{Telegram => }/ProximityAlertTriggered.php (98%) rename src/TgBotLib/Objects/{Telegram => }/RefundedPayment.php (98%) rename src/TgBotLib/Objects/{Telegram => }/ReplyKeyboardMarkup.php (99%) rename src/TgBotLib/Objects/{Telegram => }/ReplyKeyboardRemove.php (98%) rename src/TgBotLib/Objects/{Telegram => }/ResponseParameters.php (98%) rename src/TgBotLib/Objects/{Telegram => }/SentWebAppMessage.php (96%) rename src/TgBotLib/Objects/{Telegram => }/ShippingAddress.php (98%) rename src/TgBotLib/Objects/{Telegram => }/ShippingOption.php (97%) rename src/TgBotLib/Objects/{Telegram => }/ShippingQuery.php (98%) rename src/TgBotLib/Objects/{Telegram => }/Sticker.php (99%) rename src/TgBotLib/Objects/{Telegram => }/StickerSet.php (98%) rename src/TgBotLib/Objects/{Telegram => }/Story.php (98%) rename src/TgBotLib/Objects/{Telegram => }/SuccessfulPayment.php (99%) rename src/TgBotLib/Objects/{Telegram => }/TextQuote.php (98%) rename src/TgBotLib/Objects/{Telegram => }/Update.php (99%) rename src/TgBotLib/Objects/{Telegram => }/User.php (99%) rename src/TgBotLib/Objects/{Telegram => }/UserProfilePhotos.php (97%) rename src/TgBotLib/Objects/{Telegram => }/UsersShared.php (97%) rename src/TgBotLib/Objects/{Telegram => }/Venue.php (98%) rename src/TgBotLib/Objects/{Telegram => }/Video.php (99%) rename src/TgBotLib/Objects/{Telegram => }/VideoChatEnded.php (96%) rename src/TgBotLib/Objects/{Telegram => }/VideoChatParticipantsInvited.php (96%) rename src/TgBotLib/Objects/{Telegram => }/VideoChatScheduled.php (96%) rename src/TgBotLib/Objects/{Telegram => }/VideoChatStarted.php (94%) rename src/TgBotLib/Objects/{Telegram => }/VideoNote.php (98%) rename src/TgBotLib/Objects/{Telegram => }/Voice.php (98%) rename src/TgBotLib/Objects/{Telegram => }/WebAppData.php (97%) rename src/TgBotLib/Objects/{Telegram => }/WebAppInfo.php (97%) rename src/TgBotLib/Objects/{Telegram => }/WebhookInfo.php (99%) rename src/TgBotLib/Objects/{Telegram => }/WriteAccessAllowed.php (95%) diff --git a/README.md b/README.md index 551a444..bc33496 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ import('net.nosial.tgbotlib'); $bot = new TgBotLib\BotOld(''); -/** @var \TgBotLib\Objects\Telegram\Update $update */ +/** @var \TgBotLib\Objects\Update $update */ foreach ($bot->getUpdates() as $update) { $bot->sendMessage($update->getMessage()->getChat()->getId(), 'Hello World!'); @@ -152,7 +152,7 @@ To implement a single-threaded bot, it's very self-explanatory, you just need to // Loop forever while(true) { - /** @var \TgBotLib\Objects\Telegram\Update $update */ + /** @var \TgBotLib\Objects\Update $update */ foreach ($bot->getUpdates() as $update) { $bot->sendMessage($update->getMessage()->getChat()->getId(), 'Hello World!'); @@ -261,9 +261,7 @@ all the information about the update. namespace commands; - use TgBotLib\BotOld; - use TgBotLib\Interfaces\CommandInterface; - use TgBotLib\Objects\Telegram\Update; + use TgBotLib\BotOld;use TgBotLib\Interfaces\CommandInterface;use TgBotLib\Objects\Update; class StartCommand extends CommandInterface { @@ -296,9 +294,7 @@ And the interface EventInterface is used instead of CommandInterface: namespace events; - use TgBotLib\BotOld; - use TgBotLib\Interfaces\EventInterface; - use TgBotLib\Objects\Telegram\Update; + use TgBotLib\BotOld;use TgBotLib\Interfaces\EventInterface;use TgBotLib\Objects\Update; class MessageEvent implements EventInterface { diff --git a/src/TgBotLib/BotOld.php b/src/TgBotLib/BotOld.php index b04dd83..3f3f62f 100644 --- a/src/TgBotLib/BotOld.php +++ b/src/TgBotLib/BotOld.php @@ -15,36 +15,36 @@ use TgBotLib\Interfaces\CommandInterface; use TgBotLib\Interfaces\EventInterface; use TgBotLib\Interfaces\ObjectTypeInterface; - use TgBotLib\Objects\Telegram\BotCommandScope; - use TgBotLib\Objects\Telegram\BotDescription; - use TgBotLib\Objects\Telegram\BotShortDescription; - use TgBotLib\Objects\Telegram\Chat; - use TgBotLib\Objects\Telegram\ChatAdministratorRights; - use TgBotLib\Objects\Telegram\ChatInviteLink; - use TgBotLib\Objects\Telegram\ChatMember; - use TgBotLib\Objects\Telegram\File; - use TgBotLib\Objects\Telegram\ForumTopic; - use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultArticle; - use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultAudio; - use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultContact; - use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultDocument; - use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultGame; - use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultGif; - use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultLocation; - use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultMpeg4Gif; - use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultPhoto; - use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultVenue; - use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultVideo; - use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultVoice; - use TgBotLib\Objects\Telegram\MenuButton; - use TgBotLib\Objects\Telegram\Message; - use TgBotLib\Objects\Telegram\Poll; - use TgBotLib\Objects\Telegram\SentWebAppMessage; - use TgBotLib\Objects\Telegram\Sticker; - use TgBotLib\Objects\Telegram\Update; - use TgBotLib\Objects\Telegram\User; - use TgBotLib\Objects\Telegram\UserProfilePhotos; - use TgBotLib\Objects\Telegram\WebhookInfo; + use TgBotLib\Objects\BotCommandScope; + use TgBotLib\Objects\BotDescription; + use TgBotLib\Objects\BotShortDescription; + use TgBotLib\Objects\Chat; + use TgBotLib\Objects\ChatAdministratorRights; + use TgBotLib\Objects\ChatInviteLink; + use TgBotLib\Objects\ChatMember; + use TgBotLib\Objects\File; + use TgBotLib\Objects\ForumTopic; + use TgBotLib\Objects\InlineQueryResult\InlineQueryResultArticle; + use TgBotLib\Objects\InlineQueryResult\InlineQueryResultAudio; + use TgBotLib\Objects\InlineQueryResult\InlineQueryResultContact; + use TgBotLib\Objects\InlineQueryResult\InlineQueryResultDocument; + use TgBotLib\Objects\InlineQueryResult\InlineQueryResultGame; + use TgBotLib\Objects\InlineQueryResult\InlineQueryResultGif; + use TgBotLib\Objects\InlineQueryResult\InlineQueryResultLocation; + use TgBotLib\Objects\InlineQueryResult\InlineQueryResultMpeg4Gif; + use TgBotLib\Objects\InlineQueryResult\InlineQueryResultPhoto; + use TgBotLib\Objects\InlineQueryResult\InlineQueryResultVenue; + use TgBotLib\Objects\InlineQueryResult\InlineQueryResultVideo; + use TgBotLib\Objects\InlineQueryResult\InlineQueryResultVoice; + use TgBotLib\Objects\MenuButton; + use TgBotLib\Objects\Message; + use TgBotLib\Objects\Poll; + use TgBotLib\Objects\SentWebAppMessage; + use TgBotLib\Objects\Sticker; + use TgBotLib\Objects\Update; + use TgBotLib\Objects\User; + use TgBotLib\Objects\UserProfilePhotos; + use TgBotLib\Objects\WebhookInfo; class BotOld { diff --git a/src/TgBotLib/Interfaces/CommandInterface.php b/src/TgBotLib/Interfaces/CommandInterface.php index 7fb8207..617489e 100644 --- a/src/TgBotLib/Interfaces/CommandInterface.php +++ b/src/TgBotLib/Interfaces/CommandInterface.php @@ -3,7 +3,7 @@ namespace TgBotLib\Interfaces; use TgBotLib\BotOld; - use TgBotLib\Objects\Telegram\Update; + use TgBotLib\Objects\Update; interface CommandInterface { diff --git a/src/TgBotLib/Interfaces/EventInterface.php b/src/TgBotLib/Interfaces/EventInterface.php index 796df19..d5dd599 100644 --- a/src/TgBotLib/Interfaces/EventInterface.php +++ b/src/TgBotLib/Interfaces/EventInterface.php @@ -3,7 +3,7 @@ namespace TgBotLib\Interfaces; use TgBotLib\BotOld; - use TgBotLib\Objects\Telegram\Update; + use TgBotLib\Objects\Update; interface EventInterface { diff --git a/src/TgBotLib/Methods/GetMe.php b/src/TgBotLib/Methods/GetMe.php index 4535d61..2ec4158 100644 --- a/src/TgBotLib/Methods/GetMe.php +++ b/src/TgBotLib/Methods/GetMe.php @@ -5,7 +5,7 @@ namespace TgBotLib\Methods; use TgBotLib\Abstracts\Method; use TgBotLib\Bot; use TgBotLib\Enums\Methods; -use TgBotLib\Objects\Telegram\User; +use TgBotLib\Objects\User; class GetMe extends Method { diff --git a/src/TgBotLib/Methods/SendMessage.php b/src/TgBotLib/Methods/SendMessage.php index 11e7e8e..f9f0575 100644 --- a/src/TgBotLib/Methods/SendMessage.php +++ b/src/TgBotLib/Methods/SendMessage.php @@ -6,7 +6,7 @@ use InvalidArgumentException; use TgBotLib\Abstracts\Method; use TgBotLib\Bot; use TgBotLib\Enums\Methods; -use TgBotLib\Objects\Telegram\Message; +use TgBotLib\Objects\Message; class SendMessage extends Method { diff --git a/src/TgBotLib/Objects/Telegram/Animation.php b/src/TgBotLib/Objects/Animation.php similarity index 99% rename from src/TgBotLib/Objects/Telegram/Animation.php rename to src/TgBotLib/Objects/Animation.php index 6c00626..bc2c1a6 100644 --- a/src/TgBotLib/Objects/Telegram/Animation.php +++ b/src/TgBotLib/Objects/Animation.php @@ -2,7 +2,7 @@ /** @noinspection PhpMissingFieldTypeInspection */ - namespace TgBotLib\Objects\Telegram; + namespace TgBotLib\Objects; use TgBotLib\Interfaces\ObjectTypeInterface; diff --git a/src/TgBotLib/Objects/Telegram/Audio.php b/src/TgBotLib/Objects/Audio.php similarity index 99% rename from src/TgBotLib/Objects/Telegram/Audio.php rename to src/TgBotLib/Objects/Audio.php index 11a7437..ba98eae 100644 --- a/src/TgBotLib/Objects/Telegram/Audio.php +++ b/src/TgBotLib/Objects/Audio.php @@ -2,7 +2,7 @@ /** @noinspection PhpMissingFieldTypeInspection */ - namespace TgBotLib\Objects\Telegram; + namespace TgBotLib\Objects; use TgBotLib\Interfaces\ObjectTypeInterface; diff --git a/src/TgBotLib/Objects/Telegram/BackgroundFill.php b/src/TgBotLib/Objects/BackgroundFill.php similarity index 82% rename from src/TgBotLib/Objects/Telegram/BackgroundFill.php rename to src/TgBotLib/Objects/BackgroundFill.php index 10719fb..1148946 100644 --- a/src/TgBotLib/Objects/Telegram/BackgroundFill.php +++ b/src/TgBotLib/Objects/BackgroundFill.php @@ -1,13 +1,13 @@ input_message_content; } @@ -282,10 +282,10 @@ /** * Sets the input_message_content of the result. * - * @param InputMessageContent\InputContactMessageContent|InputMessageContent\InputInvoiceMessageContent|InputMessageContent\InputLocationMessageContent|InputMessageContent\InputTextMessageContent|InputMessageContent\InputVenueMessageContent $input_message_content + * @param \TgBotLib\Objects\InputMessageContent\InputContactMessageContent|\TgBotLib\Objects\InputMessageContent\InputInvoiceMessageContent|\TgBotLib\Objects\InputMessageContent\InputLocationMessageContent|\TgBotLib\Objects\InputMessageContent\InputTextMessageContent|\TgBotLib\Objects\InputMessageContent\InputVenueMessageContent $input_message_content * @return $this */ - public function setInputMessageContent(InputMessageContent\InputContactMessageContent|InputMessageContent\InputInvoiceMessageContent|InputMessageContent\InputLocationMessageContent|InputMessageContent\InputTextMessageContent|InputMessageContent\InputVenueMessageContent $input_message_content): InlineQueryResultVoice + public function setInputMessageContent(\TgBotLib\Objects\InputMessageContent\InputContactMessageContent|\TgBotLib\Objects\InputMessageContent\InputInvoiceMessageContent|\TgBotLib\Objects\InputMessageContent\InputLocationMessageContent|\TgBotLib\Objects\InputMessageContent\InputTextMessageContent|\TgBotLib\Objects\InputMessageContent\InputVenueMessageContent $input_message_content): InlineQueryResultVoice { $this->input_message_content = $input_message_content; return $this; diff --git a/src/TgBotLib/Objects/Telegram/InputMedia.php b/src/TgBotLib/Objects/InputMedia.php similarity index 99% rename from src/TgBotLib/Objects/Telegram/InputMedia.php rename to src/TgBotLib/Objects/InputMedia.php index 32dccba..7daa2f1 100644 --- a/src/TgBotLib/Objects/Telegram/InputMedia.php +++ b/src/TgBotLib/Objects/InputMedia.php @@ -2,7 +2,7 @@ /** @noinspection PhpMissingFieldTypeInspection */ - namespace TgBotLib\Objects\Telegram; + namespace TgBotLib\Objects; use TgBotLib\Interfaces\ObjectTypeInterface; diff --git a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAnimation.php b/src/TgBotLib/Objects/InputMedia/InputMediaAnimation.php similarity index 98% rename from src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAnimation.php rename to src/TgBotLib/Objects/InputMedia/InputMediaAnimation.php index 63ff160..2abfa72 100644 --- a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAnimation.php +++ b/src/TgBotLib/Objects/InputMedia/InputMediaAnimation.php @@ -2,12 +2,12 @@ /** @noinspection PhpMissingFieldTypeInspection */ - namespace TgBotLib\Objects\Telegram\InputMedia; + namespace TgBotLib\Objects\InputMedia; use TgBotLib\Enums\Types\InputMediaType; use TgBotLib\Interfaces\ObjectTypeInterface; - use TgBotLib\Objects\Telegram\InputMedia; - use TgBotLib\Objects\Telegram\MessageEntity; + use TgBotLib\Objects\InputMedia; + use TgBotLib\Objects\MessageEntity; class InputMediaAnimation implements ObjectTypeInterface { diff --git a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAudio.php b/src/TgBotLib/Objects/InputMedia/InputMediaAudio.php similarity index 97% rename from src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAudio.php rename to src/TgBotLib/Objects/InputMedia/InputMediaAudio.php index ff4d4eb..fa40061 100644 --- a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAudio.php +++ b/src/TgBotLib/Objects/InputMedia/InputMediaAudio.php @@ -2,11 +2,11 @@ /** @noinspection PhpMissingFieldTypeInspection */ - namespace TgBotLib\Objects\Telegram\InputMedia; + namespace TgBotLib\Objects\InputMedia; use TgBotLib\Interfaces\ObjectTypeInterface; - use TgBotLib\Objects\Telegram\InputMedia; - use TgBotLib\Objects\Telegram\MessageEntity; + use TgBotLib\Objects\InputMedia; + use TgBotLib\Objects\MessageEntity; class InputMediaAudio implements ObjectTypeInterface { diff --git a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaDocument.php b/src/TgBotLib/Objects/InputMedia/InputMediaDocument.php similarity index 97% rename from src/TgBotLib/Objects/Telegram/InputMedia/InputMediaDocument.php rename to src/TgBotLib/Objects/InputMedia/InputMediaDocument.php index 7e2cb21..f8e8b9c 100644 --- a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaDocument.php +++ b/src/TgBotLib/Objects/InputMedia/InputMediaDocument.php @@ -2,11 +2,11 @@ /** @noinspection PhpMissingFieldTypeInspection */ - namespace TgBotLib\Objects\Telegram\InputMedia; + namespace TgBotLib\Objects\InputMedia; use TgBotLib\Interfaces\ObjectTypeInterface; - use TgBotLib\Objects\Telegram\InputMedia; - use TgBotLib\Objects\Telegram\MessageEntity; + use TgBotLib\Objects\InputMedia; + use TgBotLib\Objects\MessageEntity; class InputMediaDocument implements ObjectTypeInterface { diff --git a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaPhoto.php b/src/TgBotLib/Objects/InputMedia/InputMediaPhoto.php similarity index 97% rename from src/TgBotLib/Objects/Telegram/InputMedia/InputMediaPhoto.php rename to src/TgBotLib/Objects/InputMedia/InputMediaPhoto.php index fc1fbef..1d649c8 100644 --- a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaPhoto.php +++ b/src/TgBotLib/Objects/InputMedia/InputMediaPhoto.php @@ -2,11 +2,11 @@ /** @noinspection PhpMissingFieldTypeInspection */ - namespace TgBotLib\Objects\Telegram\InputMedia; + namespace TgBotLib\Objects\InputMedia; use TgBotLib\Interfaces\ObjectTypeInterface; - use TgBotLib\Objects\Telegram\InputMedia; - use TgBotLib\Objects\Telegram\MessageEntity; + use TgBotLib\Objects\InputMedia; + use TgBotLib\Objects\MessageEntity; class InputMediaPhoto implements ObjectTypeInterface { diff --git a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaVideo.php b/src/TgBotLib/Objects/InputMedia/InputMediaVideo.php similarity index 98% rename from src/TgBotLib/Objects/Telegram/InputMedia/InputMediaVideo.php rename to src/TgBotLib/Objects/InputMedia/InputMediaVideo.php index 1db7950..b50a73d 100644 --- a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaVideo.php +++ b/src/TgBotLib/Objects/InputMedia/InputMediaVideo.php @@ -2,11 +2,11 @@ /** @noinspection PhpMissingFieldTypeInspection */ - namespace TgBotLib\Objects\Telegram\InputMedia; + namespace TgBotLib\Objects\InputMedia; use TgBotLib\Interfaces\ObjectTypeInterface; - use TgBotLib\Objects\Telegram\InputMedia; - use TgBotLib\Objects\Telegram\MessageEntity; + use TgBotLib\Objects\InputMedia; + use TgBotLib\Objects\MessageEntity; class InputMediaVideo implements ObjectTypeInterface { diff --git a/src/TgBotLib/Objects/Telegram/InputMessageContent.php b/src/TgBotLib/Objects/InputMessageContent.php similarity index 81% rename from src/TgBotLib/Objects/Telegram/InputMessageContent.php rename to src/TgBotLib/Objects/InputMessageContent.php index 533cc44..0e02bc5 100644 --- a/src/TgBotLib/Objects/Telegram/InputMessageContent.php +++ b/src/TgBotLib/Objects/InputMessageContent.php @@ -1,15 +1,15 @@