-
Notifications
You must be signed in to change notification settings - Fork 16
How To Contribute
First off, thank you very much for considering contributing to the Coding Bot V6 project. Even if you decide not to contribute, you could always follow the project for updates and such.
First and foremost, this will respect the time of the people developing/contributing to the project and make it easier to finalize your pull request.
- Other reasons:
- To maintain code quality
- To write readable and consistent code with regard to the style used in this project.
- Making the Merge process much faster.
Coding Bot V6 is an Open Sourced project written in python and uses the library discord.py
and we would love to receive contributions from our community! Anything, from fixing typos, to finding bugs, to improving code structure, to adding new features.
Since the project is open source, we would like contributors to only adds/modify things relevant to the project. Any PR
that push for irrelevant things will be closed and not be merged. E.g
: PR #1 - By @Lexionas74
-
Make sure PEP 8 is being followed.
- This includes:
- One space gap while variable assignment or comparison.
e.g
:my_variable = 7
,my_variable == 7
- One space gap in arguments passed and parameters defined in a function.
def call(param1, param2, param3)
,call(arg1, arg2, arg2)
- Type hint parameters if possible, it helps the IDE to understand what type of parameter it is expecting and thus will list methods of that object
- 4 Space (don't use tabs!) indents where required for consistency purposes
- No camel cased variables for consistency purposes.
E.g
: instead ofmyVariable = 7
usemy_variable = 7
- Constants or global variables to be named in all capital, separated with
_
,e.g:
MY_GLOBAL_VARIABLE
,MY_CONSTANT
- Naming variables properly according to their purpose.
E.g
: instead ofx = 7
,my_num = 7
- One space gap while variable assignment or comparison.
- This includes:
-
Any extra database that is to be made for some purpose must create a connection inside
__aenter__
method ofDatabase
class inext/models.py
and to reuse the connection,bot.conn.key
must be used, wherekey
is to be replaced with the key of thedictionary
that holds all the open connections -
All
Websocket Event
listeners are to go insidecogs/listeners.py
. Instead of naming the function the name of the event, pass the event to@commands.Cog.listener('event')
and name the function adhering to what it does in case of multiple events of the same name are required for two different purposes.E.g
:@commands.Cog.listener('on_message') async def afk_listener(self, message: discord.Message): # rest of the code.
-
While making a
PR
(Pull Request), a clear title and description would be nice although not mandatory, it would make the merging process much faster. -
Do not make a PR for adding irrelevant content.