mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
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
|
@ -31,7 +31,8 @@ const defaultOptions: PluginOptions<ReactionRolesPluginType> = {
|
|||
],
|
||||
};
|
||||
|
||||
export const ReactionRolesPlugin = zeppelinGuildPlugin<ReactionRolesPluginType>()("reaction_roles", {
|
||||
export const ReactionRolesPlugin = zeppelinGuildPlugin<ReactionRolesPluginType>()({
|
||||
name: "reaction_roles",
|
||||
showInDocs: true,
|
||||
info: {
|
||||
prettyName: "Reaction roles",
|
||||
|
@ -53,7 +54,7 @@ export const ReactionRolesPlugin = zeppelinGuildPlugin<ReactionRolesPluginType>(
|
|||
AddReactionRoleEvt,
|
||||
],
|
||||
|
||||
onLoad(pluginData) {
|
||||
afterLoad(pluginData) {
|
||||
const { state, guild } = pluginData;
|
||||
|
||||
state.reactionRoles = GuildReactionRoles.getGuildInstance(guild.id);
|
||||
|
@ -70,7 +71,7 @@ export const ReactionRolesPlugin = zeppelinGuildPlugin<ReactionRolesPluginType>(
|
|||
}
|
||||
},
|
||||
|
||||
onUnload(pluginData) {
|
||||
beforeUnload(pluginData) {
|
||||
if (pluginData.state.autoRefreshTimeout) {
|
||||
clearTimeout(pluginData.state.autoRefreshTimeout);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ export const AddReactionRoleEvt = reactionRolesEvt({
|
|||
}
|
||||
|
||||
// Remove the reaction after a small delay
|
||||
const config = pluginData.config.getForMember(member);
|
||||
const config = await pluginData.config.getForMember(member);
|
||||
if (config.remove_user_reactions) {
|
||||
setTimeout(() => {
|
||||
pluginData.state.reactionRemoveQueue.add(async () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType, guildEventListener, guildCommand } from "knub";
|
||||
import { BasePluginType, typedGuildEventListener, typedGuildCommand } from "knub";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
|
||||
import { Queue } from "../../Queue";
|
||||
|
@ -41,5 +41,5 @@ export interface ReactionRolesPluginType extends BasePluginType {
|
|||
};
|
||||
}
|
||||
|
||||
export const reactionRolesCmd = guildCommand<ReactionRolesPluginType>();
|
||||
export const reactionRolesEvt = guildEventListener<ReactionRolesPluginType>();
|
||||
export const reactionRolesCmd = typedGuildCommand<ReactionRolesPluginType>();
|
||||
export const reactionRolesEvt = typedGuildEventListener<ReactionRolesPluginType>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue