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: 'Interaction' object has no attribute 'entitlements' #2344

Closed
3 tasks done
tibue99 opened this issue Feb 1, 2024 · 2 comments · Fixed by #2345
Closed
3 tasks done

AttributeError: 'Interaction' object has no attribute 'entitlements' #2344

tibue99 opened this issue Feb 1, 2024 · 2 comments · Fixed by #2345
Assignees
Labels
bug Something isn't working priority: high High Priority

Comments

@tibue99
Copy link
Contributor

tibue99 commented Feb 1, 2024

Summary

The newest verision (2.4.1.dev241+g9683629e) crashes when executing slash commands

Reproduction Steps

Start the bot code below and run the hello command

Minimal Reproducible Code

import discord

bot = discord.Bot()

@bot.slash_command()
async def hello(ctx):
    await ctx.respond("Hello!")

bot.run("")

Expected Results

Bot responds with Hello!

Actual Results

Traceback (most recent call last):
  File "C:\Users\Timo\Desktop\pythonProject\main.py", line 11, in <module>
    bot.run("...")
  File "C:\Users\Timo\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\client.py", line 766, in run
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\Users\Timo\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\client.py", line 745, in runner
    await self.start(*args, **kwargs)
  File "C:\Users\Timo\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\client.py", line 709, in start
    await self.connect(reconnect=reconnect)
  File "C:\Users\Timo\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\client.py", line 601, in connect
    await self.ws.poll_event()
  File "C:\Users\Timo\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\gateway.py", line 604, in poll_event
    await self.received_message(msg.data)
  File "C:\Users\Timo\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\gateway.py", line 554, in received_message
    func(data)
  File "C:\Users\Timo\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\state.py", line 816, in parse_interaction_create
    interaction = Interaction(data=data, state=self)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Timo\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\interactions.py", line 170, in __init__
    self._from_data(data)
  File "C:\Users\Timo\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\interactions.py", line 187, in _from_data
    self.entitlements: list[Entitlement] = [
    ^^^^^^^^^^^^^^^^^
AttributeError: 'Interaction' object has no attribute 'entitlements'

Intents

System Information

  • Python v3.10.9-final
  • py-cord v2.4.1-final
  • aiohttp v3.9.1
  • system info: Windows 10 10.0.22631

Checklist

  • 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.

Additional Context

No response

@tibue99 tibue99 added the unconfirmed bug A bug report that needs triaging label Feb 1, 2024
@JustaSqu1d
Copy link
Member

Cannot reproduce on 3.11.7, but reproducible on 3.12.1

@JustaSqu1d JustaSqu1d added bug Something isn't working priority: high High Priority and removed unconfirmed bug A bug report that needs triaging labels Feb 1, 2024
@Dorukyum
Copy link
Member

Dorukyum commented Feb 1, 2024

Sounds fun, on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: high High Priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants