Update to Knub30.0.0-beta.37 and Eris 0.15, first pass
This commit is contained in:
parent
84da543205
commit
f6be4f4af6
133 changed files with 6507 additions and 380 deletions
|
@ -28,7 +28,8 @@ const defaultOptions: PluginOptions<PostPluginType> = {
|
|||
],
|
||||
};
|
||||
|
||||
export const PostPlugin = zeppelinGuildPlugin<PostPluginType>()("post", {
|
||||
export const PostPlugin = zeppelinGuildPlugin<PostPluginType>()({
|
||||
name: "post",
|
||||
showInDocs: true,
|
||||
info: {
|
||||
prettyName: "Post",
|
||||
|
@ -49,7 +50,7 @@ export const PostPlugin = zeppelinGuildPlugin<PostPluginType>()("post", {
|
|||
ScheduledPostsDeleteCmd,
|
||||
],
|
||||
|
||||
onLoad(pluginData) {
|
||||
afterLoad(pluginData) {
|
||||
const { state, guild } = pluginData;
|
||||
|
||||
state.savedMessages = GuildSavedMessages.getGuildInstance(guild.id);
|
||||
|
@ -59,7 +60,7 @@ export const PostPlugin = zeppelinGuildPlugin<PostPluginType>()("post", {
|
|||
scheduledPostLoop(pluginData);
|
||||
},
|
||||
|
||||
onUnload(pluginData) {
|
||||
beforeUnload(pluginData) {
|
||||
clearTimeout(pluginData.state.scheduledPostLoopTimeout);
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType, guildCommand } from "knub";
|
||||
import { BasePluginType, typedGuildCommand } from "knub";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { GuildScheduledPosts } from "../../data/GuildScheduledPosts";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
|
@ -20,4 +20,4 @@ export interface PostPluginType extends BasePluginType {
|
|||
};
|
||||
}
|
||||
|
||||
export const postCmd = guildCommand<PostPluginType>();
|
||||
export const postCmd = typedGuildCommand<PostPluginType>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue