Skip to content
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

AttributeError: 'Context' object has no attribute 'add_reaction' #219

Closed
4 tasks done
Motzumoto opened this issue Nov 17, 2023 · 2 comments
Closed
4 tasks done

AttributeError: 'Context' object has no attribute 'add_reaction' #219

Motzumoto opened this issue Nov 17, 2023 · 2 comments
Labels

Comments

@Motzumoto
Copy link

Motzumoto commented Nov 17, 2023

Summary

running jsk debug errors. Its unable to add a reaction to the message. However jsk py adds the reaction just fine.
image

Reproduction steps

jsk debug and then anything else.

Expected results

add the reaction successfully like jsk py

Actual results

Errors

Traceback (most recent call last):
  File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/container/.local/lib/python3.10/site-packages/jishaku/features/invocation.py", line 196, in jsk_debug
    async with ReplResponseReactor(ctx):
  File "/home/container/.local/lib/python3.10/site-packages/jishaku/exception_handling.py", line 127, in __aexit__
    await attempt_add_reaction(self.message, "\N{WHITE HEAVY CHECK MARK}")
  File "/home/container/.local/lib/python3.10/site-packages/jishaku/exception_handling.py", line 93, in attempt_add_reaction
    return await msg.add_reaction(reaction)
AttributeError: 'Context' object has no attribute 'add_reaction'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/container/.local/lib/python3.10/site-packages/jishaku/features/invocation.py", line 198, in jsk_debug
    await alt_ctx.command.invoke(alt_ctx)
  File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 1650, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Context' object has no attribute 'add_reaction'

Checklist

  • I have updated discord.py and jishaku to the latest available versions and have confirmed that this issue is still present
  • I have searched the open issues for duplicates
  • I have shown the entire traceback, if possible
  • I have removed my token from display, if visible

System information

Name: jishaku
Version: 2.5.2a485+g32009b4.master
Summary: A discord.py extension including useful tools for bot development and debugging.
Home-page: https://github.com/Gorialis/jishaku
Author: Devon (Gorialis) R
Author-email:
License: MIT
Location: /home/container/.local/lib/python3.10/site-packages
Requires: braceexpand, click, import-expression, tabulate
Required-by:

Name: discord.py
Version: 2.3.2
Summary: A Python wrapper for the Discord API
Home-page: https://github.com/Rapptz/discord.py
Author: Rapptz
Author-email:
License: MIT
Location: /home/container/.local/lib/python3.10/site-packages
Requires: aiohttp
Required-by: discord-ext-menus, wavelink

@scarletcafe
Copy link
Owner

caused by changes introduced in #218, need to revert that bit

@scarletcafe scarletcafe added the bug label Jan 5, 2024
@scarletcafe
Copy link
Owner

This was fixed in #220 and I forgot to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants