Telegram-Bot-Node / Nikoro

A plugin-based, all-in-one, Telegram Bot written in Node.js
MIT License
56 stars 28 forks source link

Persist /enable, /disable to config.json #136

Closed CapacitorSet closed 7 years ago

CapacitorSet commented 7 years ago

Expected behaviour: /enable <plugin> keeps that plugin enabled "forever", even across bot restarts.

Actual behaviour: the plugin is only enabled until the next shutdown. It won't be saved to config.json, so when the bot starts next time, the plugin will no longer be enabled.

Solution: PluginManager.loadAndAdd/PluginManager.removePlugin should save the plugin in the new configuration, and save the configuration to disk.

LucasLeandro1204 commented 7 years ago

I can get this one.

CapacitorSet commented 7 years ago

Very well! Don't forget that for pull requests to count towards the Hacktoberfest, they must be opened on October 1 or later.

If you need help navigating through the codebase or otherwise have questions, feel free to ask.

LucasLeandro1204 commented 7 years ago

@CapacitorSet I know it xd, but the code seems pretty easy, I will create a function to save the config json and that's it, I just have to see how I use telegram huahuauhauha

CapacitorSet commented 7 years ago

@LucasLeandro1204 are you still planning to implement this?

LucasLeandro1204 commented 7 years ago

@CapacitorSet Sure I will haha, today I do this.

CapacitorSet commented 7 years ago

@LucasLeandro1204, please don't take up issues if you're not going to fix them.