sravan1946 / sravan-cogs

Some random cogs made by me for my bot made using Red-DiscordBot
MIT License
5 stars 10 forks source link

[timeout] changed dm message into embed + command to show mod or not #20

Closed NoobInDaHause closed 1 year ago

NoobInDaHause commented 1 year ago

Changed the DM message into and embed. Added a command [p]timeoutset showmoderator whether to show the moderator or not (default to false).

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 1.39%.

Quality metrics Before After Change
Complexity 4.72 ⭐ 5.46 ⭐ 0.74 👎
Method Length 79.92 🙂 87.57 🙂 7.65 👎
Working memory 9.18 🙂 8.91 🙂 -0.27 👍
Quality 65.09% 🙂 63.70% 🙂 -1.39% 👎
Other metrics Before After Change
Lines 222 238 16
Changed files Quality Before Quality After Quality Change
timeout/timeout.py 65.09% 🙂 63.70% 🙂 -1.39% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
timeout/timeout.py Timeout.timeout_user 12 🙂 320 ⛔ 11 😞 39.20% 😞 Try splitting into smaller methods. Extract out complex expressions
timeout/timeout.py Timeout.timeout 7 ⭐ 212 ⛔ 13 😞 45.44% 😞 Try splitting into smaller methods. Extract out complex expressions
timeout/timeout.py Timeout.untimeout 9 🙂 160 😞 12 😞 49.48% 😞 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!

Help us improve this quality report!

sravan1946 commented 1 year ago

Thanks for the PR!