Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Bot API 6.9 #168

Merged
merged 1 commit into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ data PromoteChatMemberRequest = PromoteChatMemberRequest
, promoteChatMemberCanChangeInfo :: Maybe Bool -- ^ Pass 'True', if the administrator can change chat title, photo and other settings.
, promoteChatMemberCanInviteUsers :: Maybe Bool -- ^ Pass 'True', if the administrator can invite new users to the chat.
, promoteChatMemberCanPinMessages :: Maybe Bool -- ^ Pass 'True', if the administrator can pin messages, supergroups only.
, promoteChatMemberCanPostStories :: Maybe Bool -- ^ Pass 'True' if the administrator can post stories in the channel; channels only.
, promoteChatMemberCanEditStories :: Maybe Bool -- ^ Pass 'True' if the administrator can edit stories posted by other users; channels only.
, promoteChatMemberCanDeleteStories :: Maybe Bool -- ^ Pass 'True' if the administrator can delete stories posted by other users; channels only.
, promoteChatMemberCanManageTopics :: Maybe Bool -- ^ Pass 'True', if the user is allowed to create, rename, close, and reopen forum topics, supergroups only.
}
deriving Generic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ data ChatAdministratorRights = ChatAdministratorRights
, chatAdministratorRightsCanPostMessages :: Maybe Bool -- ^ 'True', if the administrator can post in the channel; channels only.
, chatAdministratorRightsCanEditMessages :: Maybe Bool -- ^ 'True', if the administrator can edit messages of other users and can pin messages; channels only.
, chatAdministratorRightsCanPinMessages :: Maybe Bool -- ^ 'True', if the user is allowed to pin messages; groups and supergroups only
, chatAdministratorRightsCanPostStories :: Maybe Bool -- ^ 'True', if the administrator can post stories in the channel; channels only.
, chatAdministratorRightsCanEditStories :: Maybe Bool -- ^ 'True', if the administrator can edit stories posted by other users; channels only.
, chatAdministratorRightsCanDeleteStories :: Maybe Bool -- ^ 'True', if the administrator can delete stories posted by other users; channels only.
, chatAdministratorRightsCanManageTopics :: Maybe Bool -- ^ 'True', if the user is allowed to create, rename, close, and reopen forum topics; supergroups only.
}
deriving (Generic, Show)
Expand Down
3 changes: 3 additions & 0 deletions telegram-bot-api/src/Telegram/Bot/API/Types/ChatMember.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ data ChatMember = ChatMember
, chatMemberCanChangeInfo :: Maybe Bool -- ^ Administrators only. 'True', if the administrator can change the chat title, photo and other settings.
, chatMemberCanPostMessages :: Maybe Bool -- ^ Administrators only. 'True', if the administrator can post in the channel, channels only.
, chatMemberCanEditMessages :: Maybe Bool -- ^ Administrators only. 'True', if the administrator can edit messages of other users and can pin messages, channels only.
, chatMemberCanPostStories :: Maybe Bool -- ^ Administrators only. 'True', if the administrator can post stories in the channel; channels only.
, chatMemberCanEditStories :: Maybe Bool -- ^ Administrators only. 'True', if the administrator can edit stories posted by other users; channels only.
, chatMemberCanDeleteStories :: Maybe Bool -- ^ Administrators only. 'True', if the administrator can delete stories posted by other users; channels only.

-- administrator, restricted
, chatMemberCanInviteUsers :: Maybe Bool -- ^ Administrators and restricted only. 'True', if the administrator can invite new users to the chat.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import Telegram.Bot.API.Internal.Utils
-- ** 'WriteAccessAllowed'

-- | This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.
newtype WriteAccessAllowed = WriteAccessAllowed
{ writeAccessAllowedWebAppName :: Maybe Text -- ^ Name of the Web App which was launched from a link.
data WriteAccessAllowed = WriteAccessAllowed
{ writeAccessAllowedFromRequest :: Maybe Bool -- ^ True, if the access was granted after the user accepted an explicit request from a Web App sent by the method 'requestWriteAccess'.
, writeAccessAllowedWebAppName :: Maybe Text -- ^ Name of the Web App which was launched from a link.
, writeAccessAllowedFromAttachmentMenu :: Maybe Bool -- ^ 'True', if the access was granted when the bot was added to the attachment or side menu.
}
deriving (Generic, Show)

Expand Down
Loading