argo0n / NograBot

Discord.py bot written by Argon#0002
GNU General Public License v3.0
2 stars 1 forks source link

Moving of commands and fixes #65

Closed argo0n closed 3 years ago

argo0n commented 3 years ago

Will check if commands in robloxserveronly are used in the correct guild Moved yeet and unoreverse from nogra.py to Fun.py (Fun cog) Moved abuse, ban, cban and stopabusing from nogra.py to Moderation.py (Moderation cog) Moved allow, kicc, admon, cutie, uglie to RobloxServerOnly.py (RobloxServerOnly cog) Moved dmads from nogra.py to Admin.py (Admin cog) Revamped ban and cban command to lessen code, and to allow banning of userds even if they closed their dms

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 1.36%.

Quality metrics Before After Change
Complexity 4.33 ⭐ 3.83 ⭐ -0.50 👍
Method Length 56.24 ⭐ 53.88 ⭐ -2.36 👍
Working memory 9.99 😞 10.12 😞 0.13 👎
Quality 64.15% 🙂 65.51% 🙂 1.36% 👍
Other metrics Before After Change
Lines 865 964 99
Changed files Quality Before Quality After Quality Change
nogra.py 60.24% 🙂 60.86% 🙂 0.62% 👍
cogs/Admin.py 63.08% 🙂 61.71% 🙂 -1.37% 👎
cogs/Fun.py 78.62% ⭐ 79.87% ⭐ 1.25% 👍
cogs/Moderation.py 64.88% 🙂 67.15% 🙂 2.27% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
cogs/Admin.py Admin.setstatus 13 🙂 191 😞 15 😞 38.85% 😞 Try splitting into smaller methods. Extract out complex expressions
cogs/Admin.py Admin.dmads 5 ⭐ 215 ⛔ 20 ⛔ 40.09% 😞 Try splitting into smaller methods. Extract out complex expressions
nogra.py on_message 7 ⭐ 389 ⛔ 11 😞 42.41% 😞 Try splitting into smaller methods. Extract out complex expressions
cogs/Moderation.py Moderation.clear 10 🙂 203 😞 12 😞 44.84% 😞 Try splitting into smaller methods. Extract out complex expressions
nogra.py on_guild_join 4 ⭐ 217 ⛔ 15 😞 45.35% 😞 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it by mentioning @sourcery-ai in a comment.