forwards-long-jump / discotron

Modular Discord bot supporting plugins hosted on git repositories
MIT License
3 stars 5 forks source link

Convert function argument spam to objects #136

Closed RedMser closed 4 years ago

RedMser commented 4 years ago

Close #41

I went through the entire code with a regex checking for number of arguments of a function call. Left classes with 1 or 2 parameters, but did also convert those that might be extended later on despite having few args as of now (such as permissions).

Skipped WebAPI because we will be refactoring that completely at a later point.

The widget controllers were probably the best example where switching to options args helps readability, but you are free to recommend other places to fix (or if anything done here should be reverted or redesigned completely... ehem UserRole :eyes::sweat_drops:).