Nuking-Discord-Server-Bot-Nuke-Bot icon indicating copy to clipboard operation
Nuking-Discord-Server-Bot-Nuke-Bot copied to clipboard

Plans to make the code look better

Open TKperson opened this issue 2 years ago • 0 comments

This was one of my first python project. Originally created for nuking a scammer's server that scammed my friend. This bot is also inspired by cerealwithnomilk on his attempts with nuking servers that's created by people with internal issues (mostly in the brain).

This code now has 2 years of history. I'm planning on refactoring the code to make it more readable. All the code will still be inside of 1 file for portability reasons.

Well, I'm making this issue here is because I need help on refactoring the code. I'm still very busy with school (100% legit excuse), so if anyone is good at python, feel free to help this project out by making a pull request.

Refactoring goal:

  • Make code base format follow PEP-8
    • Main take away from PEP-8:
    • Each line should not exceed 79 characters limit (including spaces)
    • Do not use any tabs in the project
    • Python docstrings have a short character limit than 79 (read PEP-8 for more details)
    • Examples for DO and DON'T DO
# YES
arr = [
    "item 1",
    "item 2",
    "item 3"
]

arr2 = map(
    int,
    input().split()
)

make_requests(
    method=requests.get,
    url="https://google.com"
)

# This is ok
make_requests(url="https://google.com")
# NO
arr = ["item 1", "item 2", "item 3"]
  • Add type hints
  • Use poetry instead of requirements.txt (maybe keep requirements.txt incase people don't want to poetry) If any type-hints are going to be added please refer to PEP-484

If you have suggestions, you can leave a comment here

TKperson avatar Feb 27 '22 01:02 TKperson