Skip to content

Refactor Code #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jun 30, 2023
Merged

Refactor Code #59

merged 13 commits into from
Jun 30, 2023

Conversation

Jerry-py
Copy link
Contributor

@Jerry-py Jerry-py commented Jun 26, 2023

The code is refactored but you might need to check if it works.

Summary

This pull request is to refactor the code to be more readable and more simpler. The code hasn't been checked I don't know if it works or not.

Refactors:

  • Fixed nested loops
  • Use f-strings instead
  • Use contextlib to suppress errors
  • Merged list append
  • Remove-unnecessary-else
  • Remove redundant if
  • Etc
  • If code changes were made then they have been tested.
  • This PR fixes an issue.

The code is refactored but you might need to check if it works.
Copy link
Member

@WhoIsConch WhoIsConch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good, but please test the changes before we implement them.

/storage/Trash.png -- 1,873.96kb -> 383.95kb (79.51%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
@Jerrydotpy
Copy link
Contributor

The bot inverted my commit. Do I have to redo everything? @WhoIsConch

@iayushanand
Copy link
Collaborator

The bot inverted my commit. Do I have to redo everything? @WhoIsConch

it probably happened because a new pr was merged, I guess you gotta redo it. You can still look at your commit to make it easy

@Jerry-py
Copy link
Contributor Author

Jerry-py commented Jun 28, 2023

@iayushanand It should be fixed and it works perfectly. Also the images are also optimized

@Jerry-py
Copy link
Contributor Author

Don't merge yet because I am still improving the README

@Jerry-py
Copy link
Contributor Author

@iayushanand do i still need a cooldown section to the commands table or its good enough

It's guild not server
README.md Outdated
| None | General | **source** (github, code) | Get the source of this bot | `{prefix}source` *will send link to my source code* <br > `{prefix}source [command]` *will send link to the source code of the command* <br> `{prefix}source [command] [subcommand]`: *will send link to the source code of the subcommand* |
| None | General | **define** | Gets deinitions from Urban Dictionary. | `{prefix}define [word]`: *will send the definition of the word* |
| None | General | **avatar** | Commands for getting avatars. | `{prefix}avatar`: *will send a list of available methods* |
| None | General | **avatar main** | Start a beerparty 🍻!! | `{prefix}avatar main [user]`: *will send the main avatar of the user* |
Copy link
Collaborator

@iayushanand iayushanand Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the typo here:
image

Copy link
Collaborator

@iayushanand iayushanand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything else lgtm, fix that and I'll merge

Copy link
Collaborator

@iayushanand iayushanand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@andrewthederp andrewthederp merged commit 38a3884 into The-Coding-Realm:master Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants