From eb1ac9097ff56b214006446cd9dec1b29d995086 Mon Sep 17 00:00:00 2001 From: Shadow Date: Sat, 1 Jul 2023 14:05:50 -0400 Subject: [PATCH] add virtual message --- packages/kiai.js/src/KiaiClient.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/kiai.js/src/KiaiClient.ts b/packages/kiai.js/src/KiaiClient.ts index c61fab86..e40222fd 100644 --- a/packages/kiai.js/src/KiaiClient.ts +++ b/packages/kiai.js/src/KiaiClient.ts @@ -1,4 +1,4 @@ -import { RateLimitError } from "@buape/kiai-api-types" +import { Message, RateLimitError, VirtualMessage } from "@buape/kiai-api-types" import { RequestHandler } from "./RequestHandler" import * as handlers from "./handlers" @@ -42,7 +42,8 @@ export class KiaiClient { return res as RateLimitError } - public async createVirtualMessage() { - return {} + public async createVirtualMessage(guildId: string, message: VirtualMessage) { + const result = (await this._requestHandler.request(`/guilds/${guildId}/virtual-messages`, "POST", {}, message)) as Message + return result } }