mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-15 06:05:03 +00:00
MessageSaver: use a queue, add more logging for duplicate IDs
This commit is contained in:
parent
ebe224885e
commit
7054412640
4 changed files with 37 additions and 6 deletions
|
@ -5,6 +5,7 @@ import { SaveMessagesToDBCmd } from "./commands/SaveMessagesToDB";
|
|||
import { SavePinsToDBCmd } from "./commands/SavePinsToDB";
|
||||
import { MessageCreateEvt, MessageDeleteBulkEvt, MessageDeleteEvt, MessageUpdateEvt } from "./events/SaveMessagesEvts";
|
||||
import { ConfigSchema, MessageSaverPluginType } from "./types";
|
||||
import { Queue } from "../../Queue";
|
||||
|
||||
const defaultOptions: PluginOptions<MessageSaverPluginType> = {
|
||||
config: {
|
||||
|
@ -44,5 +45,6 @@ export const MessageSaverPlugin = zeppelinGuildPlugin<MessageSaverPluginType>()(
|
|||
beforeLoad(pluginData) {
|
||||
const { state, guild } = pluginData;
|
||||
state.savedMessages = GuildSavedMessages.getGuildInstance(guild.id);
|
||||
state.queue = new Queue();
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue