The Kisscord namespace provides access to the in-game Discord-like messaging application. Create NPC contacts, send messages, and manage friend lists.
No permission required.
Import
import { Kisscord, KisscordStatus } from "@hotbunny/hackhub-content-sdk";
Methods
Kisscord.createUser(options?)
Create a new Kisscord user with sensible defaults.
| Parameter | Type | Description |
|---|---|---|
options.id |
string? |
Custom ID (auto-generated if omitted) |
options.username |
string? |
Username |
options.firstName |
string? |
First name |
options.lastName |
string? |
Last name |
options.avatar |
string? |
Avatar image URL |
options.isFriend |
boolean? |
Auto-add as friend |
options.status |
KisscordStatus? |
Online status |
Returns: KisscordUser
const informant = Kisscord.createUser({
username: "informant",
firstName: "John",
lastName: "Doe",
isFriend: true,
status: KisscordStatus.Online,
});
Kisscord.addUser(user)
Register a user in the Kisscord system.
Kisscord.addUser(informant);
Kisscord.removeUser(userId)
Remove a user and their messages from Kisscord.
Kisscord.addFriend(username)
Mark a user as a friend by their username.
Returns: boolean - true if successful.
Kisscord.sendMessage(channelUserId, content, isMine?)
Send a message in a DM channel. The channel is identified by the other user’s ID.
| Parameter | Type | Description |
|---|---|---|
channelUserId |
string |
The other user’s ID (identifies the channel) |
content |
string |
Message content |
isMine |
boolean? |
If true, message appears as sent by the player |
Kisscord.sendMessage(informant.id, "I have the files you need.");
Kisscord.sendMessage(informant.id, "Send them over.", true); // Player's reply
Kisscord.changeStatus(userId, status)
Change a user’s online status.
Kisscord.changeStatus(informant.id, KisscordStatus.Offline);
Kisscord.getMessages(channelUserId)
Get all messages in a DM channel.
Returns: KisscordMessageInfo[]
Kisscord.Status
Re-export of the KisscordStatus enum for convenience.
Enums
KisscordStatus
enum KisscordStatus {
Online = "ONLINE",
Offline = "OFFLINE",
Idle = "IDLE",
}
Types
KisscordUser
interface KisscordUser {
id: string;
username: string;
name: string;
surname: string;
avatar: string;
isFriend?: boolean;
status: KisscordStatus;
}
KisscordMessageInfo
interface KisscordMessageInfo {
channel: string;
content: string;
isMine?: boolean;
sendedAt: string;
read?: boolean;
}