Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring plan #8

Open
4 tasks
originalnicodr opened this issue Feb 8, 2025 · 0 comments
Open
4 tasks

Refactoring plan #8

originalnicodr opened this issue Feb 8, 2025 · 0 comments
Assignees

Comments

@originalnicodr
Copy link
Owner

I have written this bot before I started working as an engineer, so a lot of how it's structured is honestly pretty awful. In order to get it into good shape I would need to do the following:

  • Refactor it using OOP. global variables are awful, so having a class that represents the bot, has these global variables as members and could be passed with simple arguments makes the most sense to me.
  • Delete prototype functions and make the code more clear. There is a lot of unused code around (like the concept of thumbnail channel, that is no longer used) that should need to be cleaned out for legibility's sake.
  • Modularize it in multiple files. A lot of this stuff makes sense to put into their module/file, like all of the interactions involving Backblaze.
  • Take the config options such as the channels being used into the config env file, to make it easier to set up for other people.

These probably make sense to tackle on its own PRs, so maybe I will be separating these into its own issues.

@originalnicodr originalnicodr self-assigned this Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant