companion_channels: handle errors gracefully
This commit is contained in:
parent
57316b142a
commit
ea069c5db3
3 changed files with 52 additions and 14 deletions
|
@ -4,6 +4,8 @@ import { VoiceChannelJoinEvt } from "./events/VoiceChannelJoinEvt";
|
|||
import { VoiceChannelSwitchEvt } from "./events/VoiceChannelSwitchEvt";
|
||||
import { VoiceChannelLeaveEvt } from "./events/VoiceChannelLeaveEvt";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { CooldownManager } from "knub";
|
||||
|
||||
const defaultOptions = {
|
||||
config: {
|
||||
|
@ -22,8 +24,13 @@ export const CompanionChannelsPlugin = zeppelinPlugin<CompanionChannelsPluginTyp
|
|||
`),
|
||||
},
|
||||
|
||||
dependencies: [LogsPlugin],
|
||||
configSchema: ConfigSchema,
|
||||
defaultOptions,
|
||||
|
||||
events: [VoiceChannelJoinEvt, VoiceChannelSwitchEvt, VoiceChannelLeaveEvt],
|
||||
|
||||
onLoad(pluginData) {
|
||||
pluginData.state.errorCooldownManager = new CooldownManager();
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue