calamity-0.3.0.0: A library for writing discord bots in haskell
Safe HaskellNone
LanguageHaskell2010

Calamity.Types.Model.User

Description

A User

Documentation

data User Source #

Instances

Instances details
Eq User Source # 
Instance details

Defined in Calamity.Types.Model.User

Methods

(==) :: User -> User -> Bool #

(/=) :: User -> User -> Bool #

Show User Source # 
Instance details

Defined in Calamity.Types.Model.User

Methods

showsPrec :: Int -> User -> ShowS #

show :: User -> String #

showList :: [User] -> ShowS #

Generic User Source # 
Instance details

Defined in Calamity.Types.Model.User

Associated Types

type Rep User :: Type -> Type #

Methods

from :: User -> Rep User x #

to :: Rep User x -> User #

ToJSON User Source # 
Instance details

Defined in Calamity.Types.Model.User

FromJSON User Source # 
Instance details

Defined in Calamity.Types.Model.User

NFData User Source # 
Instance details

Defined in Calamity.Types.Model.User

Methods

rnf :: User -> () #

TextShow User Source # 
Instance details

Defined in Calamity.Types.Model.User

Updateable User Source # 
Instance details

Defined in Calamity.Internal.Updateable

Associated Types

type Updated User Source #

Methods

update :: Updated User -> User -> User Source #

Tellable User Source # 
Instance details

Defined in Calamity.Types.Tellable

Methods

getChannel :: forall (r :: EffectRow). (BotC r, Member (Error RestError) r) => User -> Sem r (Snowflake Channel) Source #

Mentionable User Source # 
Instance details

Defined in Calamity.Utils.Message

Methods

mention :: User -> Text Source #

HasID Member User Source # 
Instance details

Defined in Calamity.Types.Model.User

HasID User Message Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Message

HasID User Member Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Member

HasID User User Source # 
Instance details

Defined in Calamity.Types.Model.User

HasID User Presence Source # 
Instance details

Defined in Calamity.Types.Model.Presence.Presence

HasID User GroupChannel Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Group

HasID User BanData Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Ban

HasID User AuditLogEntry Source # 
Instance details

Defined in Calamity.Types.Model.Guild.AuditLog

HasID User ReactionEvtData Source # 
Instance details

Defined in Calamity.Gateway.DispatchEvents

HasID User LightContext Source # 
Instance details

Defined in Calamity.Commands.Context

HasID User FullContext Source # 
Instance details

Defined in Calamity.Commands.Context

Member (CacheEff :: (Type -> Type) -> Type -> Type) r => ParameterParser User c r

ParameterParser for users, this only looks in the cache. Use Snowflake User and use upgrade if you want to allow fetching from http.

Instance details

Defined in Calamity.Commands.CalamityParsers

Associated Types

type ParserResult User

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

parse :: Sem (ParserEffs c r) (ParserResult User)

HasID User (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

Upgradeable User (Snowflake User) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: EffectRow). BotC r => Snowflake User -> Sem r (Maybe User) Source #

Eq (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

Show (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

Generic (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

Associated Types

type Rep (Partial User) :: Type -> Type #

Methods

from :: Partial User -> Rep (Partial User) x #

to :: Rep (Partial User) x -> Partial User #

ToJSON (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

FromJSON (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

TextShow (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

Tellable (Snowflake User) Source # 
Instance details

Defined in Calamity.Types.Tellable

Methods

getChannel :: forall (r :: EffectRow). (BotC r, Member (Error RestError) r) => Snowflake User -> Sem r (Snowflake Channel) Source #

ToMessage (TMention User) Source #

Add a User id to the list of allowed user mentions

Instance details

Defined in Calamity.Types.Tellable

Mentionable (Snowflake User) Source # 
Instance details

Defined in Calamity.Utils.Message

ParameterParser (Snowflake User) c r

Accepts both plain IDs and mentions

Instance details

Defined in Calamity.Commands.CalamityParsers

Associated Types

type ParserResult (Snowflake User)

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

parse :: Sem (ParserEffs c r) (ParserResult (Snowflake User))

type Rep User Source # 
Instance details

Defined in Calamity.Types.Model.User

type ParserResult User 
Instance details

Defined in Calamity.Commands.CalamityParsers

type ParserResult User = User
newtype Partial User Source # 
Instance details

Defined in Calamity.Types.Model.User

type Updated User Source # 
Instance details

Defined in Calamity.Internal.Updateable

type Rep (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

type Rep (Partial User) = D1 ('MetaData "Partial" "Calamity.Types.Model.User" "calamity-0.3.0.0-inplace" 'True) (C1 ('MetaCons "PartialUser" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Snowflake User))))
type ParserResult (Snowflake User) 
Instance details

Defined in Calamity.Commands.CalamityParsers

type ParserResult (Snowflake User) = Snowflake User

data family Partial t Source #

Instances

Instances details
HasID Channel (Partial Channel) Source # 
Instance details

Defined in Calamity.Types.Model.Channel

HasID Channel (Partial Message) Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Message

HasID Guild (Partial Guild) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Guild

HasID User (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

HasID Emoji (Partial Emoji) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Emoji

Eq (Partial Channel) Source # 
Instance details

Defined in Calamity.Types.Model.Channel

Eq (Partial Guild) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Guild

Eq (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

Eq (Partial Emoji) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Emoji

Show (Partial Channel) Source # 
Instance details

Defined in Calamity.Types.Model.Channel

Show (Partial Message) Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Message

Show (Partial Guild) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Guild

Show (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

Show (Partial Emoji) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Emoji

Generic (Partial Channel) Source # 
Instance details

Defined in Calamity.Types.Model.Channel

Associated Types

type Rep (Partial Channel) :: Type -> Type #

Generic (Partial Message) Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Message

Associated Types

type Rep (Partial Message) :: Type -> Type #

Generic (Partial Guild) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Guild

Associated Types

type Rep (Partial Guild) :: Type -> Type #

Generic (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

Associated Types

type Rep (Partial User) :: Type -> Type #

Methods

from :: Partial User -> Rep (Partial User) x #

to :: Rep (Partial User) x -> Partial User #

Generic (Partial Emoji) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Emoji

Associated Types

type Rep (Partial Emoji) :: Type -> Type #

ToJSON (Partial Channel) Source # 
Instance details

Defined in Calamity.Types.Model.Channel

ToJSON (Partial Guild) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Guild

ToJSON (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

ToJSON (Partial Emoji) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Emoji

FromJSON (Partial Channel) Source # 
Instance details

Defined in Calamity.Types.Model.Channel

FromJSON (Partial Message) Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Message

FromJSON (Partial Guild) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Guild

FromJSON (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

FromJSON (Partial Emoji) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Emoji

TextShow (Partial Channel) Source # 
Instance details

Defined in Calamity.Types.Model.Channel

TextShow (Partial Message) Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Message

TextShow (Partial Guild) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Guild

TextShow (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

TextShow (Partial Emoji) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Emoji

data Partial Channel Source # 
Instance details

Defined in Calamity.Types.Model.Channel

data Partial Message Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Message

data Partial Guild Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Guild

newtype Partial User Source # 
Instance details

Defined in Calamity.Types.Model.User

data Partial Emoji Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Emoji

type Rep (Partial Channel) Source # 
Instance details

Defined in Calamity.Types.Model.Channel

type Rep (Partial Message) Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Message

type Rep (Partial Message) = D1 ('MetaData "Partial" "Calamity.Types.Model.Channel.Message" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "PartialMessage" 'PrefixI 'True) (S1 ('MetaSel ('Just "channelID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Snowflake Channel)) :*: S1 ('MetaSel ('Just "guildID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Snowflake Guild)))))
type Rep (Partial Guild) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Guild

type Rep (Partial Guild) = D1 ('MetaData "Partial" "Calamity.Types.Model.Guild.Guild" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "PartialGuild" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Snowflake Guild)) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))
type Rep (Partial User) Source # 
Instance details

Defined in Calamity.Types.Model.User

type Rep (Partial User) = D1 ('MetaData "Partial" "Calamity.Types.Model.User" "calamity-0.3.0.0-inplace" 'True) (C1 ('MetaCons "PartialUser" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Snowflake User))))
type Rep (Partial Emoji) Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Emoji

type Rep (Partial Emoji) = D1 ('MetaData "Partial" "Calamity.Types.Model.Guild.Emoji" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "PartialEmoji" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Snowflake Emoji)) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "animated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))))

data StatusType Source #

Constructors

Idle 
DND 
Online 
Offline 
Invisible 

Instances

Instances details
Enum StatusType Source # 
Instance details

Defined in Calamity.Types.Model.User

Eq StatusType Source # 
Instance details

Defined in Calamity.Types.Model.User

Show StatusType Source # 
Instance details

Defined in Calamity.Types.Model.User

Generic StatusType Source # 
Instance details

Defined in Calamity.Types.Model.User

Associated Types

type Rep StatusType :: Type -> Type #

ToJSON StatusType Source # 
Instance details

Defined in Calamity.Types.Model.User

FromJSON StatusType Source # 
Instance details

Defined in Calamity.Types.Model.User

NFData StatusType Source # 
Instance details

Defined in Calamity.Types.Model.User

Methods

rnf :: StatusType -> () #

TextShow StatusType Source # 
Instance details

Defined in Calamity.Types.Model.User

type Rep StatusType Source # 
Instance details

Defined in Calamity.Types.Model.User

type Rep StatusType = D1 ('MetaData "StatusType" "Calamity.Types.Model.User" "calamity-0.3.0.0-inplace" 'False) ((C1 ('MetaCons "Idle" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DND" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Online" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Offline" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Invisible" 'PrefixI 'False) (U1 :: Type -> Type))))