Skip to main content
The Deno 2 Release Candidate is here
Learn more
class DialogueHelper
import { DialogueHelper } from "https://deno.land/x/sptaki@1.2.0/helpers/DialogueHelper.d.ts";

Constructors

new
DialogueHelper(
logger: ILogger,
hashUtil: HashUtil,
saveServer: SaveServer,
databaseServer: DatabaseServer,
notifierHelper: NotifierHelper,
notificationSendHelper: NotificationSendHelper,
localisationService: LocalisationService,
itemHelper: ItemHelper,
)

Properties

protected
databaseServer: DatabaseServer
protected
hashUtil: HashUtil
protected
itemHelper: ItemHelper
protected
localisationService: LocalisationService
protected
logger: ILogger
protected
notificationSendHelper: NotificationSendHelper
protected
notifierHelper: NotifierHelper
protected
saveServer: SaveServer

Methods

getDialogsForProfile(sessionId: string): Record<string, Dialogue>

Get the dialogs dictionary for a profile, create if doesnt exist

getMessageItemContents(
messageID: string,
sessionID: string,
itemId: string,
): Item[]

Get the item contents for a particular message.

getMessagePreview(dialogue: Dialogue): MessagePreview

Get the preview contents of the last message in a dialogue.