scarletcafe / jishaku

A debugging and testing cog for discord.py rewrite bots.
https://jishaku.readthedocs.io/en/latest/
MIT License
541 stars 181 forks source link

jsk permtrace bug #135

Closed ghost closed 2 years ago

ghost commented 2 years ago

Summary

The jsk permtrace doesnt work as expected

Reproduction steps

Use the permtrace, It only returns the permissions for the guild owner/role or users with admin perms. ??jsk permtrace <channel_id> <user_id> I also tried using a <role_id> but that gave me the same error.

Expected results

To show the results of the command, ie the users permissions in the channel.

Actual results

Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/app/.heroku/python/lib/python3.9/site-packages/jishaku/features/guild.py", line 138, in jsk_permtrace
    if overwrite.is_role() and overwrite.id in role_lookup:
AttributeError: '_Overwrites' object has no attribute 'is_role'

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

Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/app/.heroku/python/lib/python3.9/site-packages/discord/ext/commands/core.py", line 1348, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/app/.heroku/python/lib/python3.9/site-packages/discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/app/.heroku/python/lib/python3.9/site-packages/discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: '_Overwrites' object has no attribute 'is_role'

Checklist

System information

Jishaku v2.3.1, discord.py 1.7.3, Python 3.9.6

scarletcafe commented 2 years ago

Whoops, looks like I slipped in a 2.0a-only change without realizing it. I'll have to shim for it but should be fixed soon enough.

scarletcafe commented 2 years ago

This should be fixed in 2.3.2, which will be available from pip likely within the next hour.