-
-
Couldn't load subscription status.
- 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
Conversation
✅ Deploy Preview for bot-core ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
This is used by the bots to push stats to statsd in a non-blocking way. Co-authored-by: Joe Banks <joe@jb3.dev>
This commit also modifies the extensions util, since it's now directly used by bot-core. Co-authored-by: Mark <1515135+MarkKoz@users.noreply.github.com> Co-authored-by: Hassan Abouelela <hassan@hassanamr.com>
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 |
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
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.
Co-authored-by: Mark <1515135+MarkKoz@users.noreply.github.com>
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: