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

Calamity.Commands.ParsePrefix

Description

Command prefix parsing effect

Synopsis

Documentation

data ParsePrefix m a where Source #

An effect for parsing the prefix of a command.

Constructors

ParsePrefix :: Message -> ParsePrefix m (Maybe (Text, Text)) 

Instances

Instances details
type DefiningModule (ParsePrefix :: k -> Type -> Type) Source # 
Instance details

Defined in Calamity.Commands.ParsePrefix

type DefiningModule (ParsePrefix :: k -> Type -> Type) = "Calamity.Commands.ParsePrefix"

parsePrefix :: forall r. MemberWithError ParsePrefix r => Message -> Sem r (Maybe (Text, Text)) Source #

useConstantPrefix :: Text -> Sem (ParsePrefix ': r) a -> Sem r a Source #

A default interpretation for ParsePrefix that uses a single constant prefix.