Separate plugin interface to reduce file size

This commit is contained in:
Tulir Asokan 2018-06-14 10:29:37 +03:00
parent d572522a96
commit ef8fffaff8
9 changed files with 254 additions and 31 deletions

View file

@ -86,10 +86,9 @@ func (bot *Bot) createPlugins() {
continue
}
log.Debugf("Created plugin %s (type %s v%s)\n", plugin.ID, creator.Name, creator.Version)
bot.Plugins[plugin.ID] = &PluginWrapper{
Plugin: creator.Create(bot, plugin, client),
Plugin: creator.Create(client),
Creator: creator,
DB: plugin,
}