Skip to content

Commit 2bda09a

Browse files
committed
immediately got conflicts, but luckily because it wasn't exported before this is not a breaking change
1 parent d0f839c commit 2bda09a

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/Discord/Internal/Types/Interactions.hs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
module Discord.Internal.Types.Interactions
1212
( Interaction (..),
1313
ComponentData (..),
14-
SelectMenuData (..),
14+
SelectMenuValues (..),
1515
ApplicationCommandData (..),
1616
OptionsData (..),
1717
OptionDataSubcommandOrGroup (..),
@@ -244,7 +244,7 @@ data ComponentData
244244
{ -- | The unique id of the component (up to 100 characters).
245245
componentDataCustomId :: T.Text,
246246
-- | Values for the select menu.
247-
componentDataValues :: SelectMenuData
247+
componentDataValues :: SelectMenuValues
248248
}
249249
deriving (Show, Read, Eq, Ord)
250250

@@ -263,29 +263,29 @@ instance FromJSON ComponentData where
263263
_ -> fail $ "unknown interaction data component type: " <> show t
264264
)
265265

266-
data SelectMenuData
267-
= SelectMenuDataText [T.Text] -- ^ The values of text chosen options
268-
| SelectMenuDataUser [UserId] -- ^ The users selected
269-
| SelectMenuDataRole [RoleId] -- ^ The roles selected
270-
| SelectMenuDataMentionable [Snowflake] -- ^ The users or roles selected
271-
| SelectMenuDataChannels [ChannelId] -- ^ The channels selected
266+
data SelectMenuValues
267+
= SelectMenuValuesText [T.Text] -- ^ The values of text chosen options
268+
| SelectMenuValuesUser [UserId] -- ^ The users selected
269+
| SelectMenuValuesRole [RoleId] -- ^ The roles selected
270+
| SelectMenuValuesMentionable [Snowflake] -- ^ The users or roles selected
271+
| SelectMenuValuesChannels [ChannelId] -- ^ The channels selected
272272
deriving (Show, Read, Eq, Ord)
273273

274-
instance FromJSON SelectMenuData where
274+
instance FromJSON SelectMenuValues where
275275
parseJSON =
276276
withObject
277-
"SelectMenuData"
277+
"SelectMenuValues"
278278
$ \v -> do
279279
t <- v .: "component_type" :: Parser Int
280-
let cons :: forall a. FromJSON a => ([a] -> SelectMenuData) -> Parser SelectMenuData
280+
let cons :: forall a. FromJSON a => ([a] -> SelectMenuValues) -> Parser SelectMenuValues
281281
cons f = f <$> v .: "values"
282282
case t of
283-
3 -> cons SelectMenuDataText
284-
5 -> cons SelectMenuDataUser
285-
6 -> cons SelectMenuDataRole
286-
7 -> cons SelectMenuDataMentionable
287-
8 -> cons SelectMenuDataChannels
288-
_ -> fail $ "unknown SelectMenuData type: " <> show t
283+
3 -> cons SelectMenuValuesText
284+
5 -> cons SelectMenuValuesUser
285+
6 -> cons SelectMenuValuesRole
286+
7 -> cons SelectMenuValuesMentionable
287+
8 -> cons SelectMenuValuesChannels
288+
_ -> fail $ "unknown SelectMenuValues type: " <> show t
289289

290290
data ApplicationCommandData
291291
= ApplicationCommandDataUser

0 commit comments

Comments
 (0)