Skip to content
GitHub

MessageParamTypes

interface in meocord/interface Since 4.1.0

interface MessageParamTypes

What each param type in a message pattern gives the handler, by the name a pattern uses for it.

Read it to see what {amount:int} or {target:member} gives, and augment it with the types your app adds in @MeoCord({ messages: { types } }), so their handlers are typed.

Members

string

string: string

A word, or "quoted words". The type of a param that names none.

int

int: number

A whole number, such as 50 or -3.

number

number: number

A number, such as 2.5.

bool

bool: boolean

yes, no, true, false, on or off.

duration

duration: number

A length of time such as 10m, 2h30m or 7d, in milliseconds.

member

member: GuildMember

A member of the message's server, by mention or ID.

user

user: User

A user, by mention or ID.

role

role: Role

A role of the message's server, by mention, ID or name.

channel

channel: GuildBasedChannel

A channel of the message's server, by mention or ID.

See also