Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

Latest commit

 

History

History
23 lines (16 loc) · 1.23 KB

CONTRIBUTING.md

File metadata and controls

23 lines (16 loc) · 1.23 KB

Contributing

Contributions are very welcome! Here are some guidelines on how the project is designed.

CodeStyle

  • Adhere to PEP8 as much as possible.

  • Line lengths should be under 120 characters, use list comprehensions over map/filter, don't leave trailing whitespace.

  • More complex pieces of code should be commented for future reference.

Structure

There are a few self-imposed rules on the project structure, to keep the project as tidy as possible.

  • All modules should go into the plugins/ directory.
  • Any database accesses should be done in plugins/sql/ - no instances of SESSION should be imported anywhere else.
  • Make sure your database sessions are properly scoped! Always close them properly.
  • When creating a new module, there should be as few changes to other files as possible required to incorporate it. Removing the module file should result in a bot which is still in perfect working condition.
  • If a module is dependent on multiple other files, which might not be loaded, then create a list of at module load time, in __main__, by looking at attributes. This is how migration, /help, /stats, /info, and many other things are based off of. It allows the bot to work fine with the LOAD and NO_LOAD configurations.