- Getting started
- Console commands
- Define bot commands
- Define keyboard
- Telegram API implementation status
- FAQ
- License
- Other packages
- PHP >= 8
- Laravel >= 10
composer require kolirt/laravel-telegram
php artisan telegram:install
php artisan migrate
php artisan telegram:bot-create {bot-name} {token}
telegram:bot-create {bot_name}
- Create a new bottelegram:bot-delete-commands {bot_name}
- Delete bot commandstelegram:bot-update-commands {bot_name}
- Update bot commandstelegram:install
- Installation the packagetelegram:meta
- Generate metadatatelegram:publish-commands
- Publish example commandstelegram:publish-config
- Publish the config filetelegram:publish-migrations
- Publish migration filestelegram:publish-routes
- Publish the route filetelegram:serve {bot_name}
- Serve the bot without webhook
You can configure bot commands in routes/telegram.php
, which will be published after the installation, and then you can update the commands in bot using the php aritsan telegram:bot-update-commands {bot_name}
command
$config->bot('test')
->commands(function (CommandBuilder $builder) {
$builder->start(StartCommand::class, 'Start command description');
$builder->command('info', InfoCommand::class, 'Info command description');
$builder->command('test', [TestCommand::class, 'index'], 'Test command description');
})
$config->bot('tma')
->keyboard(function (KeyboardBuilder $keyboard) {
$keyboard->defaultHandler(StartCommand::class);
// OR
$keyboard->defaultHandler(HomeController::class);
});
- Update - [source code]
- WebhookInfo - [source code]
- getUpdates - [source code]
- setWebhook - [source code]
- deleteWebhook - [source code]
- getWebhookInfo - [source code]
- User - [source code]
- Chat - [source code]
- Message - [source code]
- MessageId
- InaccessibleMessage
- MaybeInaccessibleMessage
- MessageEntity
- TextQuote
- ExternalReplyInfo
- ReplyParameters
- MessageOrigin
- MessageOriginUser
- MessageOriginHiddenUser
- MessageOriginChat
- MessageOriginChannel
- PhotoSize
- Animation
- Audio
- Document
- Story
- Video
- VideoNote
- Voice
- Contact
- Dice
- PollOption
- PollAnswer
- Poll
- Location
- Venue
- WebAppData
- ProximityAlertTriggered
- MessageAutoDeleteTimerChanged
- ChatBoostAdded
- ForumTopicCreated
- ForumTopicClosed
- ForumTopicEdited
- ForumTopicReopened
- GeneralForumTopicHidden
- GeneralForumTopicUnhidden
- SharedUser
- UsersShared
- ChatShared
- WriteAccessAllowed
- VideoChatScheduled
- VideoChatStarted
- VideoChatEnded
- VideoChatParticipantsInvited
- GiveawayCreated
- Giveaway
- GiveawayWinners
- GiveawayCompleted
- LinkPreviewOptions
- UserProfilePhotos
- File
- WebAppInfo
- ReplyKeyboardMarkup
- KeyboardButton
- KeyboardButtonRequestUsers
- KeyboardButtonRequestChat
- KeyboardButtonPollType
- ReplyKeyboardRemove
- InlineKeyboardMarkup
- InlineKeyboardButton
- LoginUrl
- SwitchInlineQueryChosenChat
- CallbackQuery
- ForceReply
- ChatPhoto
- ChatInviteLink
- ChatAdministratorRights
- ChatMemberUpdated
- ChatMember - [source code]
- ChatMemberOwner - [source code]
- ChatMemberAdministrator - [source code]
- ChatMemberMember - [source code]
- ChatMemberRestricted - [source code]
- ChatMemberLeft - [source code]
- ChatMemberBanned - [source code]
- ChatJoinRequest
- ChatPermissions
- Birthdate
- BusinessIntro
- BusinessLocation
- BusinessOpeningHoursInterval
- BusinessOpeningHours
- ChatLocation
- ReactionType
- ReactionTypeEmoji
- ReactionTypeCustomEmoji
- ReactionCount
- MessageReactionUpdated
- MessageReactionCountUpdated
- ForumTopic
- BotCommand
- BotCommandScope
- Determining list of commands
- BotCommandScopeDefault
- BotCommandScopeAllPrivateChats
- BotCommandScopeAllGroupChats
- BotCommandScopeAllChatAdministrators
- BotCommandScopeChat
- BotCommandScopeChatAdministrators
- BotCommandScopeChatMember
- BotName
- BotDescription
- BotShortDescription
- MenuButton
- MenuButtonCommands
- MenuButtonWebApp
- MenuButtonDefault
- ChatBoostSource
- ChatBoostSourcePremium
- ChatBoostSourceGiftCode
- ChatBoostSourceGiveaway
- ChatBoost
- ChatBoostUpdated
- ChatBoostRemoved
- UserChatBoosts
- BusinessConnection
- BusinessMessagesDeleted
- ResponseParameters
- InputMedia
- InputMediaPhoto
- InputMediaVideo
- InputMediaAnimation
- InputMediaAudio
- InputMediaDocument
- InputFile
- Sending files
- Accent colors
- Profile accent colors
- Inline mode objects
- getMe [source code]
- logOut
- close
- sendMessage [source code]
- Formatting options
- forwardMessage
- forwardMessages
- copyMessage
- copyMessages
- sendPhoto [source code]
- sendAudio
- sendDocument
- sendVideo
- sendAnimation
- sendVoice
- sendVideoNote
- sendMediaGroup
- sendLocation
- sendVenue
- sendContact
- sendPoll
- sendDice
- sendChatAction
- setMessageReaction
- getUserProfilePhotos
- getFile
- banChatMember
- unbanChatMember
- restrictChatMember
- promoteChatMember
- setChatAdministratorCustomTitle
- banChatSenderChat
- unbanChatSenderChat
- setChatPermissions
- exportChatInviteLink
- createChatInviteLink
- editChatInviteLink
- revokeChatInviteLink
- approveChatJoinRequest
- declineChatJoinRequest
- setChatPhoto
- deleteChatPhoto
- setChatTitle
- setChatDescription
- pinChatMessage
- unpinChatMessage
- unpinAllChatMessages
- leaveChat
- getChat
- getChatAdministrators
- getChatMemberCount
- getChatMember - [source code]
- setChatStickerSet
- deleteChatStickerSet
- getForumTopicIconStickers
- createForumTopic
- editForumTopic
- closeForumTopic
- reopenForumTopic
- deleteForumTopic
- unpinAllForumTopicMessages
- editGeneralForumTopic
- closeGeneralForumTopic
- reopenGeneralForumTopic
- hideGeneralForumTopic
- unhideGeneralForumTopic
- unpinAllGeneralForumTopicMessages
- answerCallbackQuery
- getUserChatBoosts
- getBusinessConnection
- setMyCommands [source code]
- deleteMyCommands [source code]
- getMyCommands [source code]
- setMyName
- getMyName
- setMyDescription
- getMyDescription
- setMyShortDescription
- getMyShortDescription
- setChatMenuButton
- getChatMenuButton
- setMyDefaultAdministratorRights
- getMyDefaultAdministratorRights
- Inline mode methods
Check closed issues to get answers for most asked questions
Check out my other packages on my GitHub profile