3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-14 22:05:01 +00:00

feat: update knub; update public interfaces for new knub

This commit is contained in:
Dragory 2024-03-30 13:31:30 +00:00
parent c2ae6d53d8
commit c89c5ea430
No known key found for this signature in database
15 changed files with 193 additions and 241 deletions

View file

@ -2,7 +2,7 @@ import { PluginOptions, guildPlugin } from "knub";
import z from "zod";
import { Queue } from "../../Queue";
import { Webhooks } from "../../data/Webhooks";
import { mapToPublicFn } from "../../pluginUtils";
import { makePublicFn } from "../../pluginUtils";
import { editMessage } from "./functions/editMessage";
import { sendMessage } from "./functions/sendMessage";
import { InternalPosterPluginType } from "./types";
@ -18,10 +18,11 @@ export const InternalPosterPlugin = guildPlugin<InternalPosterPluginType>()({
configParser: (input) => z.strictObject({}).parse(input),
defaultOptions,
// prettier-ignore
public: {
sendMessage: mapToPublicFn(sendMessage),
editMessage: mapToPublicFn(editMessage),
public(pluginData) {
return {
sendMessage: makePublicFn(pluginData, sendMessage),
editMessage: makePublicFn(pluginData, editMessage),
};
},
async beforeLoad(pluginData) {