DialogueManager - antilandjs/antiland.js GitHub Wiki
The manager for any and all, cached or uncached, dialogues.
extends BaseManager
Methods
Promise<boolean>
.block(dialogueId) :Block a chat. (unsure whether this works)
Name | Type | Optional |
---|---|---|
dialogueId | string | No |
Promise<object>
.editMessage(messageId, content) :Edit an existing message.
Name | Type | Optional |
---|---|---|
messageId | string | No |
content | string | No |
Promise<Dialogue>
.fetch(id, options?) :Fetch a user profile.
Name | Type | Optional |
---|---|---|
id | string | No |
options | object | Yes |
Promise<Map<id, Message>>
.history(dialogueId, options?) :Fetch message history for a dialogue.
Name | Type | Optional |
---|---|---|
dialogueId | string | No |
options | object | Yes |
Promise<boolean>
.leave(dialogueId) :Leave a dialogue.
Name | Type | Optional |
---|---|---|
dialogueId | string | No |
Promise<Dialogue>
.random(lastUsers, options?) :Start a private chat with a random user.
Name | Type | Optional |
---|---|---|
lastUsers | Array | Yes |
options | object | Yes |
Promise<object>
.send(dialogueId, content, options?) :Send a message in a dialogue.
Name | Type | Optional |
---|---|---|
dialogueId | string | No |
content | string | No |
options | object | Yes |
Promise<User>
.sendAnySticker(dialogueId, stickerId, options?) :Send any sticker as an image file.
Name | Type | Optional |
---|---|---|
dialogueId | string | No |
stickerId | string | No |
options | object | Yes |
Promise<User>
.sendLove(messageId, options?) :Send love to the author of the message for their kind words. (costs 1₭)
Name | Type | Optional |
---|---|---|
messageId | string | No |
options | object | Yes |
Promise<object>
.sendMedia(dialogueId, mediaURL, options?) :Send a photo or video.
Name | Type | Optional |
---|---|---|
dialogueId | string | No |
mediaURL | string | No |
options | object | Yes |
Promise<User>
.sendSticker(stickerId, a, options?) :Send any sticker as an image file.
Name | Type | Optional |
---|---|---|
dialogueId | string | No |
stickerId | string | No |
options | object | Yes |
Promise<boolean>
.unsend(messageId) :Unsend a message.
Name | Type | Optional |
---|---|---|
messageId | string | No |