Skip to content
Merged
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
37 changes: 35 additions & 2 deletions calamity/Calamity/Types/Model/Channel/Message.hs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,24 @@ data MessageType
| GuildDiscoveryDisqualified
| GuildDiscoveryRequalified
| Reply
| ApplicationCommmand
| ChatInputCommand
| ThreadStartedMessage
| GuildInviteReminder
| ContextMenuCommand
| AutoModerationAction
| RoleSubscriptionPurchase
| InteractionPremiumUpsell
| StageStart
| StageEnd
| StageSpeaker
| StageTopic
| GuildApplicationPremiumSubscription
| GuildIncidentAlertModeEnabled
| GuildIncidentAlertModeDisabled
| GuildIncidentReportRaid
| GuildIncidentReportFalseAlarm
| PurchaseNotification
| PollResult
deriving (Eq, Show, Enum)

instance Aeson.FromJSON MessageType where
Expand All @@ -228,7 +245,23 @@ instance Aeson.FromJSON MessageType where
14 -> pure GuildDiscoveryDisqualified
15 -> pure GuildDiscoveryRequalified
19 -> pure Reply
20 -> pure ApplicationCommmand
20 -> pure ChatInputCommand
21 -> pure GuildInviteReminder
22 -> pure ContextMenuCommand
23 -> pure AutoModerationAction
24 -> pure RoleSubscriptionPurchase
25 -> pure InteractionPremiumUpsell
26 -> pure StageStart
27 -> pure StageEnd
28 -> pure StageSpeaker
31 -> pure StageTopic
32 -> pure GuildApplicationPremiumSubscription
36 -> pure GuildIncidentAlertModeEnabled
37 -> pure GuildIncidentAlertModeDisabled
38 -> pure GuildIncidentReportRaid
39 -> pure GuildIncidentReportFalseAlarm
44 -> pure PurchaseNotification
46 -> pure PollResult
_ -> fail $ "Invalid MessageType: " <> show n
Nothing -> fail $ "Invalid MessageType: " <> show n

Expand Down
Loading