Skip to content

Kisscord

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

typescript
import { Kisscord, KisscordStatus } from "@hotbunny/hackhub-content-sdk";

Methods

Kisscord.createUser(options?)

Create a new Kisscord user with sensible defaults.

ParameterTypeDescription
options.idstring?Custom ID (auto-generated if omitted)
options.usernamestring?Username
options.firstNamestring?First name
options.lastNamestring?Last name
options.avatarstring?Avatar image URL
options.isFriendboolean?Auto-add as friend
options.statusKisscordStatus?Online status

Returns: KisscordUser

typescript
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.

typescript
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: booleantrue if successful.

Kisscord.sendMessage(channelUserId, content, isMine?)

Send a message in a DM channel. The channel is identified by the other user's ID.

ParameterTypeDescription
channelUserIdstringThe other user's ID (identifies the channel)
contentstringMessage content
isMineboolean?If true, message appears as sent by the player
typescript
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.

typescript
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

typescript
enum KisscordStatus {
    Online = "ONLINE",
    Offline = "OFFLINE",
    Idle = "IDLE",
}

Types

KisscordUser

typescript
interface KisscordUser {
    id: string;
    username: string;
    name: string;
    surname: string;
    avatar: string;
    isFriend?: boolean;
    status: KisscordStatus;
}

KisscordMessageInfo

typescript
interface KisscordMessageInfo {
    channel: string;
    content: string;
    isMine?: boolean;
    sendedAt: string;
    read?: boolean;
}

HotBunny Interactive Entertainment Inc.