calamity-0.1.26.0: 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))

Parse a prefix in a message, returning a tuple of (prefix, remaining message)

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"

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

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