packages feed

discord-haskell 1.7.0 → 1.8.0

raw patch · 4 files changed

+20/−4 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Discord.Internal.Types.Channel: ChannelText :: ChannelId -> GuildId -> Text -> Integer -> [Overwrite] -> Integer -> Bool -> Text -> Maybe MessageId -> ParentId -> Channel
+ Discord.Internal.Types.Channel: ChannelText :: ChannelId -> GuildId -> Text -> Integer -> [Overwrite] -> Integer -> Bool -> Text -> Maybe MessageId -> Maybe ParentId -> Channel
- Discord.Internal.Types.Channel: ChannelVoice :: ChannelId -> GuildId -> Text -> Integer -> [Overwrite] -> Bool -> Integer -> Integer -> Channel
+ Discord.Internal.Types.Channel: ChannelVoice :: ChannelId -> GuildId -> Text -> Integer -> [Overwrite] -> Bool -> Integer -> Integer -> Maybe ParentId -> Channel
- Discord.Internal.Types.Channel: [parentId] :: Channel -> ParentId
+ Discord.Internal.Types.Channel: [parentId] :: Channel -> Maybe ParentId

Files

changelog.md view
@@ -2,6 +2,20 @@  View on github for newest version: https://github.com/aquarial/discord-haskell/blob/master/changelog.md +Discord API changes, so use the most recent version at all times++## 1.8.0++Fixed [null parent_id on channel](https://github.com/aquarial/discord-haskell/issues/55)++## 1.7.0++[elikoga](https://github.com/aquarial/discord-haskell/pull/51) Changed to use `ReaderT` interface++[elikoga](https://github.com/aquarial/discord-haskell/pull/50) Fixed compiler warnings++Changed api url to new `discord.com`+ ## 1.6.1  Changed discordapp.com to discord.com in accordance with official discord policy 
discord-haskell.cabal view
@@ -1,7 +1,7 @@ cabal-version:       2.0 name:                discord-haskell -- library version is also noted at src/Discord/Rest/Prelude.hs-version:             1.7.0+version:             1.8.0 description:         Functions and data types to write discord bots.                      Official discord docs <https://discord.com/developers/docs/reference>.                      .
src/Discord/Internal/Rest/Prelude.hs view
@@ -24,7 +24,7 @@   where   -- | https://discord.com/developers/docs/reference#user-agent   -- Second place where the library version is noted-  agent = "DiscordBot (https://github.com/aquarial/discord-haskell, 1.7.0)"+  agent = "DiscordBot (https://github.com/aquarial/discord-haskell, 1.8.0)"  -- Append to an URL infixl 5 //
src/Discord/Internal/Types/Channel.hs view
@@ -30,7 +30,7 @@       , channelTopic       :: T.Text      -- ^ The topic of the channel. (0 - 1024 chars).       , channelLastMessage :: Maybe MessageId   -- ^ The id of the last message sent in the                                                 --   channel-      , parentId           :: ParentId    -- ^ The id of the parent channel (category)+      , parentId           :: Maybe ParentId    -- ^ The id of the parent channel (category)       }   | ChannelNews       { channelId          :: ChannelId@@ -60,6 +60,7 @@       , channelNSFW        :: Bool       , channelBitRate     :: Integer     -- ^ The bitrate (in bits) of the channel.       , channelUserLimit   :: Integer     -- ^ The user limit of the voice channel.+      , parentId           :: Maybe ParentId       }   -- | DM Channels represent a one-to-one conversation between two users, outside the scope   --   of guilds@@ -93,7 +94,7 @@                      <*> o .:? "nsfw" .!= False                      <*> o .:? "topic" .!= ""                      <*> o .:? "last_message_id"-                     <*> o .:  "parent_id"+                     <*> o .:? "parent_id"       1 ->         ChannelDirectMessage <$> o .:  "id"                              <*> o .:  "recipients"@@ -107,6 +108,7 @@                      <*> o .:? "nsfw" .!= False                      <*> o .:  "bitrate"                      <*> o .:  "user_limit"+                     <*> o .:? "parent_id"       3 ->         ChannelGroupDM <$> o .:  "id"                        <*> o .:  "recipients"