-
-
Notifications
You must be signed in to change notification settings - Fork 9
Bump d.py and add bot base #42
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for bot-core ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
ChrisLovering
commented
Mar 23, 2022
ChrisLovering
commented
Mar 23, 2022
MarkKoz
requested changes
Mar 24, 2022
This is used by the bots to push stats to statsd in a non-blocking way. Co-authored-by: Joe Banks <[email protected]>
This commit also modifies the extensions util, since it's now directly used by bot-core. Co-authored-by: Mark <[email protected]> Co-authored-by: Hassan Abouelela <[email protected]>
Since *args and **kwargs already allow these to be passed, there is no use in explicitly listing them. allowed_roles has been left there, to ensure that it is always passed, since it's important to use this to avoid bots being able to ping large roles.
This allows commands like extensions and source to see all of the available commands, rather than just the currently loaded commands.
cad9722
to
a904fcb
Compare
Force push was to add co-authors |
MarkKoz
reviewed
Mar 24, 2022
MarkKoz
requested changes
Mar 24, 2022
40ef2a1
to
53bc8f6
Compare
Doing a naive git log --grep closing_tasks on the bot repo I found these two places it was used: python-discord/bot@429cc86 - Reddit cog to revoke the access token on unload, which has since been moved to lance (without this feature). python-discord/bot@f4004d8 - Silence cog, which has been removed since. Since this list of tasks to close when closing the Discord connection is no longer used, it has been removed from BotBase.
53bc8f6
to
5a02b3b
Compare
MarkKoz
approved these changes
Apr 2, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect there is still some nice way to make statsd optional, but we can revisit it later.
MarkKoz
reviewed
Apr 2, 2022
Co-authored-by: Mark <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This bumps d.py up to a more recent commit, that includes the changes to make cog.ext loading async. See here for more reading https://gist.github.com/Rapptz/6706e1c8f23ac27c98cee4dd985c8120.
This also adds a BotBase class, which is intended to be used by all our bots. This base class implements a lot of our "boiler plate" code, such as stats, root aliases and wait_until_guild_available to name a few.
Since the extensions util is only used on bot startup, to load extensions, I have removed it from the documented utils, since that is now abstracted away by
BotBase.load_extensions()
ToDo: