aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts')
-rw-r--r--bot/exts/easter/egghead_quiz.py2
-rw-r--r--bot/exts/evergreen/error_handler.py5
-rw-r--r--bot/exts/evergreen/snakes/_snakes_cog.py2
-rw-r--r--bot/exts/evergreen/wolfram.py6
4 files changed, 6 insertions, 9 deletions
diff --git a/bot/exts/easter/egghead_quiz.py b/bot/exts/easter/egghead_quiz.py
index 59c1f6f8..b6b1593d 100644
--- a/bot/exts/easter/egghead_quiz.py
+++ b/bot/exts/easter/egghead_quiz.py
@@ -64,7 +64,7 @@ class EggheadQuiz(commands.Cog):
del self.quiz_messages[msg.id]
- msg = await ctx.channel.fetch_message(msg.id) # Refreshes message
+ msg = await ctx.fetch_message(msg.id) # Refreshes message
total_no = sum([len(await r.users().flatten()) for r in msg.reactions]) - len(valid_emojis) # - bot's reactions
diff --git a/bot/exts/evergreen/error_handler.py b/bot/exts/evergreen/error_handler.py
index faaf1386..de8e53d0 100644
--- a/bot/exts/evergreen/error_handler.py
+++ b/bot/exts/evergreen/error_handler.py
@@ -125,10 +125,7 @@ class CommandErrorHandler(commands.Cog):
scope.set_extra("full_message", ctx.message.content)
if ctx.guild is not None:
- scope.set_extra(
- "jump_to",
- f"https://discordapp.com/channels/{ctx.guild.id}/{ctx.channel.id}/{ctx.message.id}"
- )
+ scope.set_extra("jump_to", ctx.message.jump_url)
log.exception(f"Unhandled command error: {str(error)}", exc_info=error)
diff --git a/bot/exts/evergreen/snakes/_snakes_cog.py b/bot/exts/evergreen/snakes/_snakes_cog.py
index b844960a..c50b23c5 100644
--- a/bot/exts/evergreen/snakes/_snakes_cog.py
+++ b/bot/exts/evergreen/snakes/_snakes_cog.py
@@ -1052,7 +1052,7 @@ class Snakes(Cog):
# Get a random message from the users history
messages = []
- async for message in ctx.channel.history(limit=500).filter(
+ async for message in ctx.history(limit=500).filter(
lambda msg: msg.author == ctx.author # Message was sent by author.
):
messages.append(message.content)
diff --git a/bot/exts/evergreen/wolfram.py b/bot/exts/evergreen/wolfram.py
index 3cc12c03..ca7d8454 100644
--- a/bot/exts/evergreen/wolfram.py
+++ b/bot/exts/evergreen/wolfram.py
@@ -105,7 +105,7 @@ def custom_cooldown(*ignore: List[int]) -> Callable:
async def get_pod_pages(ctx: Context, bot: Bot, query: str) -> Optional[List[Tuple]]:
"""Get the Wolfram API pod pages for the provided query."""
- async with ctx.channel.typing():
+ async with ctx.typing():
url_str = parse.urlencode({
"input": query,
"appid": APPID,
@@ -180,7 +180,7 @@ class Wolfram(Cog):
query = QUERY.format(request="simple", data=url_str)
# Give feedback that the bot is working.
- async with ctx.channel.typing():
+ async with ctx.typing():
async with self.bot.http_session.get(query) as response:
status = response.status
image_bytes = await response.read()
@@ -263,7 +263,7 @@ class Wolfram(Cog):
query = QUERY.format(request="result", data=url_str)
# Give feedback that the bot is working.
- async with ctx.channel.typing():
+ async with ctx.typing():
async with self.bot.http_session.get(query) as response:
status = response.status
response_text = await response.text()