Safe Haskell | None |
---|---|
Language | Haskell2010 |
Interaction related utilities
Synopsis
- respond :: forall t r. (Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r, ToMessage t) => t -> Sem r (Either RestError ())
- respondEphemeral :: forall t r. (Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r, ToMessage t) => t -> Sem r (Either RestError ())
- followUp :: forall t r. (Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r, ToMessage t) => t -> Sem r (Either RestError ())
- followUpEphemeral :: forall t r. (Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r, ToMessage t) => t -> Sem r (Either RestError ())
- edit :: forall t r. (Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r, ToMessage t) => t -> Sem r (Either RestError ())
- defer :: Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r => Sem r (Either RestError ())
- deferEphemeral :: Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r => Sem r (Either RestError ())
- deferComponent :: Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r => Sem r (Either RestError ())
- pushModal :: Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r => Text -> [Component] -> Sem r (Either RestError ())
- userLocalState :: forall r s a. Member InteractionEff r => s -> Sem (State s ': r) a -> Sem r a
Documentation
respond :: forall t r. (Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r, ToMessage t) => t -> Sem r (Either RestError ()) Source #
Respond to an interaction with a globally visible message
respondEphemeral :: forall t r. (Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r, ToMessage t) => t -> Sem r (Either RestError ()) Source #
Respond to an interaction with an ephemeral message
followUp :: forall t r. (Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r, ToMessage t) => t -> Sem r (Either RestError ()) Source #
Create a follow up response to an interaction
followUpEphemeral :: forall t r. (Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r, ToMessage t) => t -> Sem r (Either RestError ()) Source #
Create an ephemeral follow up response to an interaction
edit :: forall t r. (Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r, ToMessage t) => t -> Sem r (Either RestError ()) Source #
Respond to an interaction by editing the message that triggered the interaction
defer :: Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r => Sem r (Either RestError ()) Source #
Defer an interaction and show a loading state, use followUp
later on
deferEphemeral :: Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r => Sem r (Either RestError ()) Source #
Defer an interaction and show an ephemeral loading state, use followUp
later on
deferComponent :: Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r => Sem r (Either RestError ()) Source #
Defer operation
pushModal :: Members '[InteractionEff, RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r => Text -> [Component] -> Sem r (Either RestError ()) Source #
Push a modal as a response to an interaction
You should probably use this with runView
:: forall r s a. Member InteractionEff r | |
=> s | Initial state |
-> Sem (State s ': r) a | |
-> Sem r a |
Provide local state semantics to a running view, the state is keyed to the user invoking the interaction