aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris <[email protected]>2021-05-09 11:56:16 +0100
committerGravatar Chris <[email protected]>2021-05-09 11:56:16 +0100
commit00362198d0fef36e8973b8b034d161f5abd3113e (patch)
treeab95d51714e56b7e4edd85711ad9a84253a79673
parentPass raise_for_status as a kwarg for better readibility (diff)
Revert changes to int e
This commit reverts the changes to int e, by giving the invoker instructions on how to access the export via int e. This means the metabase exports are not inserted to every int e envrionment. I have also added a seperate message in this commit to handle when the paste service is offline.
-rw-r--r--bot/exts/moderation/metabase.py8
-rw-r--r--bot/exts/utils/internal.py4
2 files changed, 6 insertions, 6 deletions
diff --git a/bot/exts/moderation/metabase.py b/bot/exts/moderation/metabase.py
index f419edd05..6f05a320b 100644
--- a/bot/exts/moderation/metabase.py
+++ b/bot/exts/moderation/metabase.py
@@ -139,9 +139,13 @@ class Metabase(Cog):
return
paste_link = await send_to_paste_service(out, extension=extension)
+ if paste_link:
+ message = f":+1: {ctx.author.mention} Here's your link: {paste_link}"
+ else:
+ message = f":x: {ctx.author.mention} Link service is unavailible."
await ctx.send(
- f":+1: {ctx.author.mention} Here's your link: {paste_link}\n"
- f"I've also saved it to `metabase[{question_id}]`, within the internal eval environment for you!"
+ f"{message}\nYou can also access this data within internal eval by doing: "
+ f"`bot.get_cog('Metabase').exports[{question_id}]`"
)
# This cannot be static (must have a __func__ attribute).
diff --git a/bot/exts/utils/internal.py b/bot/exts/utils/internal.py
index 6a3ddb6e5..6f2da3131 100644
--- a/bot/exts/utils/internal.py
+++ b/bot/exts/utils/internal.py
@@ -156,10 +156,6 @@ class Internal(Cog):
"contextlib": contextlib
}
- # If the Metabase cog is loaded, insert all the saved exports into the env
- if metabase := self.bot.get_cog("Metabase"):
- env["metabase"] = metabase.exports
-
self.env.update(env)
# Ignore this code, it works