mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
fix: allow servers with button_groups in their reaction_roles config to load with a warning
This commit is contained in:
parent
44d68bf608
commit
d93097306c
2 changed files with 8 additions and 5 deletions
|
@ -68,11 +68,12 @@ export const ReactionRolesPlugin = zeppelinGuildPlugin<ReactionRolesPluginType>(
|
|||
},
|
||||
|
||||
afterLoad(pluginData) {
|
||||
// let autoRefreshInterval = pluginData.config.get().auto_refresh_interval;
|
||||
// if (autoRefreshInterval != null) {
|
||||
// autoRefreshInterval = Math.max(MIN_AUTO_REFRESH, autoRefreshInterval);
|
||||
// autoRefreshLoop(pluginData, autoRefreshInterval);
|
||||
// }
|
||||
const config = pluginData.config.get();
|
||||
if (config.button_groups) {
|
||||
pluginData.getPlugin(LogsPlugin).logBotAlert({
|
||||
body: "The 'button_groups' option of the 'reaction_roles' plugin is deprecated and non-functional. Consider using the new 'role_buttons' plugin instead!",
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
beforeUnload(pluginData) {
|
||||
|
|
|
@ -3,11 +3,13 @@ import { BasePluginType, typedGuildCommand, typedGuildEventListener } from "knub
|
|||
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { Queue } from "../../Queue";
|
||||
import { tNullable } from "../../utils";
|
||||
|
||||
export const ConfigSchema = t.type({
|
||||
auto_refresh_interval: t.number,
|
||||
remove_user_reactions: t.boolean,
|
||||
can_manage: t.boolean,
|
||||
button_groups: tNullable(t.unknown),
|
||||
});
|
||||
export type TConfigSchema = t.TypeOf<typeof ConfigSchema>;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue