Skip to content

Commit

Permalink
add virtual message
Browse files Browse the repository at this point in the history
  • Loading branch information
thewilloftheshadow committed Jul 1, 2023
1 parent cb42f76 commit eb1ac90
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/kiai.js/src/KiaiClient.ts
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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
}
}

0 comments on commit eb1ac90

Please sign in to comment.