DialogueManager - antilandjs/antiland.js GitHub Wiki

The manager for any and all, cached or uncached, dialogues.

extends BaseManager

Methods

.block(dialogueId) : Promise<boolean>

Block a chat. (unsure whether this works)

Name Type Optional
dialogueId string No

.editMessage(messageId, content) : Promise<object>

Edit an existing message.

Name Type Optional
messageId string No
content string No

.fetch(id, options?) : Promise<Dialogue>

Fetch a user profile.

Name Type Optional
id string No
options object Yes

.history(dialogueId, options?) : Promise<Map<id, Message>>

Fetch message history for a dialogue.

Name Type Optional
dialogueId string No
options object Yes

.leave(dialogueId) : Promise<boolean>

Leave a dialogue.

Name Type Optional
dialogueId string No

.random(lastUsers, options?) : Promise<Dialogue>

Start a private chat with a random user.

Name Type Optional
lastUsers Array Yes
options object Yes

.send(dialogueId, content, options?) : Promise<object>

Send a message in a dialogue.

Name Type Optional
dialogueId string No
content string No
options object Yes

.sendAnySticker(dialogueId, stickerId, options?) : Promise<User>

Send any sticker as an image file.

Name Type Optional
dialogueId string No
stickerId string No
options object Yes

.sendLove(messageId, options?) : Promise<User>

Send love to the author of the message for their kind words. (costs 1₭)

Name Type Optional
messageId string No
options object Yes

.sendMedia(dialogueId, mediaURL, options?) : Promise<object>

Send a photo or video.

Name Type Optional
dialogueId string No
mediaURL string No
options object Yes

.sendSticker(stickerId, a, options?) : Promise<User>

Send any sticker as an image file.

Name Type Optional
dialogueId string No
stickerId string No
options object Yes

.unsend(messageId) : Promise<boolean>

Unsend a message.

Name Type Optional
messageId string No