mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-14 13:55:03 +00:00
feat: update knub; update public interfaces for new knub
This commit is contained in:
parent
c2ae6d53d8
commit
c89c5ea430
15 changed files with 193 additions and 241 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue