-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Automatically expose cogs as globals in python eval #71
Comments
|
I don't really like having this be done by the repl context preparation because it would mean people who use A potential compromise might be to just add I don't really like the idea of a global fallback dictionary because it means people unfamiliar with the behavior won't know why they have magic ephemeral variables flying around. It's easy to tell that |
I think I'm ultimately deciding to not do this one. You can trivially use |
The Problem
Almost every time I invoke
jsk py
, it starts with_bot.get_cog('MyCog')
. It would be nice if this was exposed as_MyCog
.The Ideal Solution
Iterate over
Bot.__cogs
and expose them while generating the scopeThe Current Solution
Turn on Retain Variables, and manually store cogs in the global context, or manually execute the search every time you eval something.
The text was updated successfully, but these errors were encountered: