Safe Haskell | None |
---|---|
Language | Haskell2010 |
Things that are messageable
Synopsis
- class ToMessage a where
- intoMsg :: a -> Endo CreateMessageOptions
- class Tellable a where
- getChannel :: (BotC r, Member (Error RestError) r) => a -> Sem r (Snowflake Channel)
- newtype TFile = TFile ByteString
- tell :: forall msg r t. (BotC r, ToMessage msg, Tellable t) => t -> msg -> Sem r (Either RestError Message)
Documentation
class ToMessage a where Source #
Things that can be used to send a message
Can be used to compose text, embeds, and files. e.g.
intoMsg
Text
"A message"<>
intoMsg
Embed
(def
&
#description?~
"Embed description")
intoMsg :: a -> Endo CreateMessageOptions Source #
Turn a
into a CreateMessageOptions
builder
Instances
ToMessage String Source # | Message content, |
Defined in Calamity.Types.Tellable | |
ToMessage Text Source # | Message content, |
Defined in Calamity.Types.Tellable | |
ToMessage Text Source # | Message content, |
Defined in Calamity.Types.Tellable | |
ToMessage Embed Source # | |
Defined in Calamity.Types.Tellable | |
ToMessage CreateMessageOptions Source # | |
Defined in Calamity.Types.Tellable | |
ToMessage TFile Source # | Message file, |
Defined in Calamity.Types.Tellable | |
ToMessage (Endo CreateMessageOptions) Source # | |
Defined in Calamity.Types.Tellable | |
ToMessage (CreateMessageOptions -> CreateMessageOptions) Source # | |
Defined in Calamity.Types.Tellable |
class Tellable a where Source #
Instances
A wrapper type for sending files
Instances
Show TFile Source # | |
Generic TFile Source # | |
ToMessage TFile Source # | Message file, |
Defined in Calamity.Types.Tellable | |
type Rep TFile Source # | |
Defined in Calamity.Types.Tellable type Rep TFile = D1 ('MetaData "TFile" "Calamity.Types.Tellable" "calamity-0.1.9.2-inplace" 'True) (C1 ('MetaCons "TFile" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) |