Type Alias: SenderScope
SenderScope =
object
Defined in: scripts/types.ts:164
Builders for messages sent by one particular sender.
Properties
custom()
custom: (
name,data,options?) =>CustomBeatInput
Defined in: scripts/types.ts:205
An author-defined payload, passed through to the UI untouched.
Parameters
name
string
data
options?
Pick<MessageOptions, "id">
Returns
image()
image: (
src,options?) =>MessageBeatInput
Defined in: scripts/types.ts:193
Shorthand for a single-image media message.
Parameters
src
string
options?
MediaMessageOptions & MediaItemOptions
Returns
media()
media: (
items,options?) =>MessageBeatInput
Defined in: scripts/types.ts:187
A media message. One item is a single photo or video, several make an
album, and caption is the comment shown with them.
Parameters
items
options?
Returns
Example
m.from(anna).media([m.image("/park.webp")], { caption: m.t("anna.park") })
m.from(anna).media([m.image("/1.webp"), m.video("/2.mp4")])
text()
text: (
content,options?) =>MessageBeatInput
Defined in: scripts/types.ts:175
A text message.
Parameters
content
options?
Returns
Example
m.from(anna).text("hey, you up?")
m.from(anna).text(m.t("anna.opener"))
m.from(anna).text(<>look at <b>this</b></>)
video()
video: (
src,options?) =>MessageBeatInput
Defined in: scripts/types.ts:199
Shorthand for a single-video media message.
Parameters
src
string
options?
MediaMessageOptions & MediaItemOptions