module Calamity.Types.Model.Channel.Reaction (Reaction (..)) where
import Calamity.Internal.AesonThings
import Calamity.Types.Model.Guild.Emoji
import Data.Aeson
import GHC.Generics
import TextShow
import qualified TextShow.Generic as TSG
data Reaction = Reaction
{ Reaction -> Integer
count :: Integer
, Reaction -> Bool
me :: Bool
, Reaction -> RawEmoji
emoji :: RawEmoji
}
deriving (Reaction -> Reaction -> Bool
(Reaction -> Reaction -> Bool)
-> (Reaction -> Reaction -> Bool) -> Eq Reaction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Reaction -> Reaction -> Bool
$c/= :: Reaction -> Reaction -> Bool
== :: Reaction -> Reaction -> Bool
$c== :: Reaction -> Reaction -> Bool
Eq, Int -> Reaction -> ShowS
[Reaction] -> ShowS
Reaction -> String
(Int -> Reaction -> ShowS)
-> (Reaction -> String) -> ([Reaction] -> ShowS) -> Show Reaction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Reaction] -> ShowS
$cshowList :: [Reaction] -> ShowS
show :: Reaction -> String
$cshow :: Reaction -> String
showsPrec :: Int -> Reaction -> ShowS
$cshowsPrec :: Int -> Reaction -> ShowS
Show, (forall x. Reaction -> Rep Reaction x)
-> (forall x. Rep Reaction x -> Reaction) -> Generic Reaction
forall x. Rep Reaction x -> Reaction
forall x. Reaction -> Rep Reaction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Reaction x -> Reaction
$cfrom :: forall x. Reaction -> Rep Reaction x
Generic)
deriving (Int -> Reaction -> Builder
Int -> Reaction -> Text
Int -> Reaction -> Text
[Reaction] -> Builder
[Reaction] -> Text
[Reaction] -> Text
Reaction -> Builder
Reaction -> Text
Reaction -> Text
(Int -> Reaction -> Builder)
-> (Reaction -> Builder)
-> ([Reaction] -> Builder)
-> (Int -> Reaction -> Text)
-> (Reaction -> Text)
-> ([Reaction] -> Text)
-> (Int -> Reaction -> Text)
-> (Reaction -> Text)
-> ([Reaction] -> Text)
-> TextShow Reaction
forall a.
(Int -> a -> Builder)
-> (a -> Builder)
-> ([a] -> Builder)
-> (Int -> a -> Text)
-> (a -> Text)
-> ([a] -> Text)
-> (Int -> a -> Text)
-> (a -> Text)
-> ([a] -> Text)
-> TextShow a
showtlList :: [Reaction] -> Text
$cshowtlList :: [Reaction] -> Text
showtl :: Reaction -> Text
$cshowtl :: Reaction -> Text
showtlPrec :: Int -> Reaction -> Text
$cshowtlPrec :: Int -> Reaction -> Text
showtList :: [Reaction] -> Text
$cshowtList :: [Reaction] -> Text
showt :: Reaction -> Text
$cshowt :: Reaction -> Text
showtPrec :: Int -> Reaction -> Text
$cshowtPrec :: Int -> Reaction -> Text
showbList :: [Reaction] -> Builder
$cshowbList :: [Reaction] -> Builder
showb :: Reaction -> Builder
$cshowb :: Reaction -> Builder
showbPrec :: Int -> Reaction -> Builder
$cshowbPrec :: Int -> Reaction -> Builder
TextShow) via TSG.FromGeneric Reaction
deriving ([Reaction] -> Encoding
[Reaction] -> Value
Reaction -> Encoding
Reaction -> Value
(Reaction -> Value)
-> (Reaction -> Encoding)
-> ([Reaction] -> Value)
-> ([Reaction] -> Encoding)
-> ToJSON Reaction
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Reaction] -> Encoding
$ctoEncodingList :: [Reaction] -> Encoding
toJSONList :: [Reaction] -> Value
$ctoJSONList :: [Reaction] -> Value
toEncoding :: Reaction -> Encoding
$ctoEncoding :: Reaction -> Encoding
toJSON :: Reaction -> Value
$ctoJSON :: Reaction -> Value
ToJSON, Value -> Parser [Reaction]
Value -> Parser Reaction
(Value -> Parser Reaction)
-> (Value -> Parser [Reaction]) -> FromJSON Reaction
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Reaction]
$cparseJSONList :: Value -> Parser [Reaction]
parseJSON :: Value -> Parser Reaction
$cparseJSON :: Value -> Parser Reaction
FromJSON) via CalamityJSON Reaction