xmppjs-chat-bot
Version:
Server-side XMPP chat bot
22 lines (21 loc) • 690 B
TypeScript
/// <reference types="xmpp__xml" />
/// <reference types="xmpp__jid" />
import type { JID } from '@xmpp/jid';
import type { Node } from '@xmpp/xml';
declare abstract class Reference {
abstract readonly type: string;
abstract toXml(): Node;
}
declare class ReferenceMention extends Reference {
protected readonly jid: JID;
protected readonly begin: number;
protected readonly end: number;
readonly type = "mention";
constructor(jid: JID, begin: number, end: number);
toXml(): Node;
static mention(txt: string, jid: JID, placeholder?: string): {
txt: string;
references: ReferenceMention[];
};
}
export { Reference, ReferenceMention };