{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -Wno-partial-type-signatures #-}

-- | Emoji endpoints
module Calamity.HTTP.Emoji (
  EmojiRequest (..),
  CreateGuildEmojiOptions (..),
  ModifyGuildEmojiOptions (..),
) where

import Calamity.HTTP.Internal.Request
import Calamity.HTTP.Internal.Route
import Calamity.Internal.Utils (CalamityToJSON (..), CalamityToJSON' (..), (.=))
import Calamity.Types.Model.Guild
import Calamity.Types.Snowflake
import Data.Aeson qualified as Aeson
import Data.Function
import Data.Text (Text)
import Network.HTTP.Req
import Optics.TH

data CreateGuildEmojiOptions = CreateGuildEmojiOptions
  { CreateGuildEmojiOptions -> Text
name :: Text
  , CreateGuildEmojiOptions -> Text
image :: Text
  , CreateGuildEmojiOptions -> [Snowflake Role]
roles :: [Snowflake Role]
  }
  deriving (Int -> CreateGuildEmojiOptions -> ShowS
[CreateGuildEmojiOptions] -> ShowS
CreateGuildEmojiOptions -> String
(Int -> CreateGuildEmojiOptions -> ShowS)
-> (CreateGuildEmojiOptions -> String)
-> ([CreateGuildEmojiOptions] -> ShowS)
-> Show CreateGuildEmojiOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CreateGuildEmojiOptions -> ShowS
showsPrec :: Int -> CreateGuildEmojiOptions -> ShowS
$cshow :: CreateGuildEmojiOptions -> String
show :: CreateGuildEmojiOptions -> String
$cshowList :: [CreateGuildEmojiOptions] -> ShowS
showList :: [CreateGuildEmojiOptions] -> ShowS
Show)
  deriving ([CreateGuildEmojiOptions] -> Value
[CreateGuildEmojiOptions] -> Encoding
CreateGuildEmojiOptions -> Value
CreateGuildEmojiOptions -> Encoding
(CreateGuildEmojiOptions -> Value)
-> (CreateGuildEmojiOptions -> Encoding)
-> ([CreateGuildEmojiOptions] -> Value)
-> ([CreateGuildEmojiOptions] -> Encoding)
-> ToJSON CreateGuildEmojiOptions
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: CreateGuildEmojiOptions -> Value
toJSON :: CreateGuildEmojiOptions -> Value
$ctoEncoding :: CreateGuildEmojiOptions -> Encoding
toEncoding :: CreateGuildEmojiOptions -> Encoding
$ctoJSONList :: [CreateGuildEmojiOptions] -> Value
toJSONList :: [CreateGuildEmojiOptions] -> Value
$ctoEncodingList :: [CreateGuildEmojiOptions] -> Encoding
toEncodingList :: [CreateGuildEmojiOptions] -> Encoding
Aeson.ToJSON) via CalamityToJSON CreateGuildEmojiOptions

instance CalamityToJSON' CreateGuildEmojiOptions where
  toPairs :: forall kv. KeyValue kv => CreateGuildEmojiOptions -> [Maybe kv]
toPairs CreateGuildEmojiOptions {[Snowflake Role]
Text
$sel:name:CreateGuildEmojiOptions :: CreateGuildEmojiOptions -> Text
$sel:image:CreateGuildEmojiOptions :: CreateGuildEmojiOptions -> Text
$sel:roles:CreateGuildEmojiOptions :: CreateGuildEmojiOptions -> [Snowflake Role]
name :: Text
image :: Text
roles :: [Snowflake Role]
..} =
    [ Key
"name" Key -> Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Text
name
    , Key
"image" Key -> Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Text
image
    , Key
"roles" Key -> [Snowflake Role] -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= [Snowflake Role]
roles
    ]

data ModifyGuildEmojiOptions = ModifyGuildEmojiOptions
  { ModifyGuildEmojiOptions -> Text
name :: Text
  , ModifyGuildEmojiOptions -> [Snowflake Role]
roles :: [Snowflake Role]
  }
  deriving (Int -> ModifyGuildEmojiOptions -> ShowS
[ModifyGuildEmojiOptions] -> ShowS
ModifyGuildEmojiOptions -> String
(Int -> ModifyGuildEmojiOptions -> ShowS)
-> (ModifyGuildEmojiOptions -> String)
-> ([ModifyGuildEmojiOptions] -> ShowS)
-> Show ModifyGuildEmojiOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ModifyGuildEmojiOptions -> ShowS
showsPrec :: Int -> ModifyGuildEmojiOptions -> ShowS
$cshow :: ModifyGuildEmojiOptions -> String
show :: ModifyGuildEmojiOptions -> String
$cshowList :: [ModifyGuildEmojiOptions] -> ShowS
showList :: [ModifyGuildEmojiOptions] -> ShowS
Show)
  deriving ([ModifyGuildEmojiOptions] -> Value
[ModifyGuildEmojiOptions] -> Encoding
ModifyGuildEmojiOptions -> Value
ModifyGuildEmojiOptions -> Encoding
(ModifyGuildEmojiOptions -> Value)
-> (ModifyGuildEmojiOptions -> Encoding)
-> ([ModifyGuildEmojiOptions] -> Value)
-> ([ModifyGuildEmojiOptions] -> Encoding)
-> ToJSON ModifyGuildEmojiOptions
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: ModifyGuildEmojiOptions -> Value
toJSON :: ModifyGuildEmojiOptions -> Value
$ctoEncoding :: ModifyGuildEmojiOptions -> Encoding
toEncoding :: ModifyGuildEmojiOptions -> Encoding
$ctoJSONList :: [ModifyGuildEmojiOptions] -> Value
toJSONList :: [ModifyGuildEmojiOptions] -> Value
$ctoEncodingList :: [ModifyGuildEmojiOptions] -> Encoding
toEncodingList :: [ModifyGuildEmojiOptions] -> Encoding
Aeson.ToJSON) via CalamityToJSON ModifyGuildEmojiOptions

instance CalamityToJSON' ModifyGuildEmojiOptions where
  toPairs :: forall kv. KeyValue kv => ModifyGuildEmojiOptions -> [Maybe kv]
toPairs ModifyGuildEmojiOptions {[Snowflake Role]
Text
$sel:name:ModifyGuildEmojiOptions :: ModifyGuildEmojiOptions -> Text
$sel:roles:ModifyGuildEmojiOptions :: ModifyGuildEmojiOptions -> [Snowflake Role]
name :: Text
roles :: [Snowflake Role]
..} =
    [ Key
"name" Key -> Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Text
name
    , Key
"roles" Key -> [Snowflake Role] -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= [Snowflake Role]
roles
    ]

data EmojiRequest a where
  ListGuildEmojis :: (HasID Guild g) => g -> EmojiRequest [Emoji]
  GetGuildEmoji :: (HasID Guild g, HasID Emoji e) => g -> e -> EmojiRequest Emoji
  CreateGuildEmoji :: (HasID Guild g) => g -> CreateGuildEmojiOptions -> EmojiRequest Emoji
  ModifyGuildEmoji :: (HasID Guild g, HasID Emoji e) => g -> e -> ModifyGuildEmojiOptions -> EmojiRequest Emoji
  DeleteGuildEmoji :: (HasID Guild g, HasID Emoji e) => g -> e -> EmojiRequest ()

baseRoute :: Snowflake Guild -> RouteBuilder _
baseRoute :: Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild,
           AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
baseRoute Snowflake Guild
id = RouteBuilder '[]
mkRouteBuilder RouteBuilder '[] -> S -> ConsRes S '[]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"guilds" RouteBuilder '[] -> ID Guild -> ConsRes (ID Guild) '[]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @Guild RouteBuilder
  '[ '( 'IDRequirement Guild,
        AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild,
           AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"emojis" RouteBuilder
  '[ '( 'IDRequirement Guild,
        AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild,
            AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
    -> RouteBuilder
         '[ '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild,
               AddRequiredInner (Lookup ('IDRequirement Guild) '[]))])
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild,
           AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
forall a b. a -> (a -> b) -> b
& Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild,
           AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild,
           AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake Guild
id

instance Request (EmojiRequest a) where
  type Result (EmojiRequest a) = a

  route :: EmojiRequest a -> Route
route (ListGuildEmojis (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) = Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (GetGuildEmoji (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @Emoji -> Snowflake Emoji
eid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID Emoji
-> ConsRes
     (ID Emoji)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @Emoji
      RouteBuilder
  '[ '( 'IDRequirement Emoji, 'Required),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Emoji, 'Required),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement Emoji, 'Satisfied),
            '( 'IDRequirement Emoji, 'Required),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement Emoji, 'Satisfied),
        '( 'IDRequirement Emoji, 'Required),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Emoji
-> RouteBuilder
     '[ '( 'IDRequirement Emoji, 'Required),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement Emoji, 'Satisfied),
        '( 'IDRequirement Emoji, 'Required),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake Emoji
eid
      RouteBuilder
  '[ '( 'IDRequirement Emoji, 'Satisfied),
     '( 'IDRequirement Emoji, 'Required),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Emoji, 'Satisfied),
         '( 'IDRequirement Emoji, 'Required),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Emoji, 'Satisfied),
     '( 'IDRequirement Emoji, 'Required),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (CreateGuildEmoji (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) CreateGuildEmojiOptions
_) = Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (ModifyGuildEmoji (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @Emoji -> Snowflake Emoji
eid) ModifyGuildEmojiOptions
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID Emoji
-> ConsRes
     (ID Emoji)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @Emoji
      RouteBuilder
  '[ '( 'IDRequirement Emoji, 'Required),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Emoji, 'Required),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement Emoji, 'Satisfied),
            '( 'IDRequirement Emoji, 'Required),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement Emoji, 'Satisfied),
        '( 'IDRequirement Emoji, 'Required),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Emoji
-> RouteBuilder
     '[ '( 'IDRequirement Emoji, 'Required),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement Emoji, 'Satisfied),
        '( 'IDRequirement Emoji, 'Required),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake Emoji
eid
      RouteBuilder
  '[ '( 'IDRequirement Emoji, 'Satisfied),
     '( 'IDRequirement Emoji, 'Required),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Emoji, 'Satisfied),
         '( 'IDRequirement Emoji, 'Required),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Emoji, 'Satisfied),
     '( 'IDRequirement Emoji, 'Required),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (DeleteGuildEmoji (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @Emoji -> Snowflake Emoji
eid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID Emoji
-> ConsRes
     (ID Emoji)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @Emoji
      RouteBuilder
  '[ '( 'IDRequirement Emoji, 'Required),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Emoji, 'Required),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement Emoji, 'Satisfied),
            '( 'IDRequirement Emoji, 'Required),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement Emoji, 'Satisfied),
        '( 'IDRequirement Emoji, 'Required),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Emoji
-> RouteBuilder
     '[ '( 'IDRequirement Emoji, 'Required),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement Emoji, 'Satisfied),
        '( 'IDRequirement Emoji, 'Required),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake Emoji
eid
      RouteBuilder
  '[ '( 'IDRequirement Emoji, 'Satisfied),
     '( 'IDRequirement Emoji, 'Required),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Emoji, 'Satisfied),
         '( 'IDRequirement Emoji, 'Required),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Emoji, 'Satisfied),
     '( 'IDRequirement Emoji, 'Required),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute

  action :: EmojiRequest a -> Url 'Https -> Option 'Https -> Req LbsResponse
action (ListGuildEmojis g
_) = Url 'Https -> Option 'Https -> Req LbsResponse
getWith
  action (GetGuildEmoji g
_ e
_) = Url 'Https -> Option 'Https -> Req LbsResponse
getWith
  action (CreateGuildEmoji g
_ CreateGuildEmojiOptions
o) = ReqBodyJson CreateGuildEmojiOptions
-> Url 'Https -> Option 'Https -> Req LbsResponse
forall a.
HttpBody a =>
a -> Url 'Https -> Option 'Https -> Req LbsResponse
postWith' (CreateGuildEmojiOptions -> ReqBodyJson CreateGuildEmojiOptions
forall a. a -> ReqBodyJson a
ReqBodyJson CreateGuildEmojiOptions
o)
  action (ModifyGuildEmoji g
_ e
_ ModifyGuildEmojiOptions
o) = ReqBodyJson ModifyGuildEmojiOptions
-> Url 'Https -> Option 'Https -> Req LbsResponse
forall a.
HttpBody a =>
a -> Url 'Https -> Option 'Https -> Req LbsResponse
patchWith' (ModifyGuildEmojiOptions -> ReqBodyJson ModifyGuildEmojiOptions
forall a. a -> ReqBodyJson a
ReqBodyJson ModifyGuildEmojiOptions
o)
  action (DeleteGuildEmoji g
_ e
_) = Url 'Https -> Option 'Https -> Req LbsResponse
deleteWith

$(makeFieldLabelsNoPrefix ''CreateGuildEmojiOptions)
$(makeFieldLabelsNoPrefix ''ModifyGuildEmojiOptions)