| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Calamity.Types.Tellable
Description
Things that are messageable
Synopsis
- class ToMessage a where
- intoMsg :: a -> Endo CreateMessageOptions
- class Tellable a where
- newtype TMention a = TMention (Snowflake a)
- tell :: forall msg r t. (BotC r, ToMessage msg, Tellable t) => t -> msg -> Sem r (Either RestError Message)
- reply :: forall msg r t. (BotC r, ToMessage msg, HasID Channel t, HasID Message t) => t -> msg -> Sem r (Either RestError Message)
- runToMessage :: ToMessage a => a -> CreateMessageOptions
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.
intoMsgText"A message"<>intoMsgEmbed(def&#description?~"Embed description")
Instances
class Tellable a where Source #
Methods
getChannel :: (BotC r, Member (Error RestError) r) => a -> Sem r (Snowflake Channel) Source #
Instances
| Tellable FullContext Source # | |
Defined in Calamity.Commands.Context | |
| Tellable LightContext Source # | |
Defined in Calamity.Commands.Context | |
| Tellable Channel Source # | |
| Tellable DMChannel Source # | |
| Tellable TextChannel Source # | |
Defined in Calamity.Types.Tellable | |
| Tellable Message Source # | |
| Tellable Member Source # | |
| Tellable User Source # | |
| Tellable (Snowflake Channel) Source # | |
| Tellable (Snowflake DMChannel) Source # | |
| Tellable (Snowflake TextChannel) Source # | |
Defined in Calamity.Types.Tellable | |
| Tellable (Snowflake Member) Source # | |
| Tellable (Snowflake User) Source # | |
A wrapper type for allowing mentions
Instances
| Show (TMention a) Source # | |
| ToMessage (TMention Member) Source # | Add a |
Defined in Calamity.Types.Tellable | |
| ToMessage (TMention Role) Source # | Add a |
Defined in Calamity.Types.Tellable | |
| ToMessage (TMention User) Source # | Add a |
Defined in Calamity.Types.Tellable | |
tell :: forall msg r t. (BotC r, ToMessage msg, Tellable t) => t -> msg -> Sem r (Either RestError Message) Source #
reply :: forall msg r t. (BotC r, ToMessage msg, HasID Channel t, HasID Message t) => t -> msg -> Sem r (Either RestError Message) Source #
runToMessage :: ToMessage a => a -> CreateMessageOptions Source #