Proper usage of dict.get
Opened this issue · 1 comments
TheUntraceable commented
Summary
Throughout the source code, we never index the value. We need to change this to index when it is guaranteed to be present, which can be depicted via the Discord Docs.
Reproduction Steps
Not relevant
Minimal Reproducible Code
No response
Expected Results
To use the fastest direct index, and not the .get
Actual Results
Everywhere, we use .get.
Intents
No response
System Information
Latest.
Checklist
- This bug was found on the latest version of EpikCord
- You have checked that there is no issue already mentioning this bug, open or closed
- Full details of the bug have been provided/shown, including full tracebacks in case of exceptions
- All bot tokens have been hidden/omitted from any screenshots or code, if any
Additional Context
No response
TheUntraceable commented
If anyone would like to help with this, even a single line, use this for reference. https://discord.com/developers/docs/reference#nullable-and-optional-resource-fields. We only will use dict.get
when we have an optional field.