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

Infinite recursion when getting message mentions #91

Open
defaultuser8848 opened this issue Jan 4, 2025 · 1 comment
Open

Infinite recursion when getting message mentions #91

defaultuser8848 opened this issue Jan 4, 2025 · 1 comment
Labels
unconfirmed bug Something isn't working

Comments

@defaultuser8848
Copy link

Describe the bug
I was going to get mentions list of a sent message with Message.mentions property,but an error has occurred.

Traceback (most recent call last):
  File "C:\Program Files\Python312\Lib\site-packages\revolt\ext\commands\command.py", line 97, in invoke
    return await self.callback(self.cog or context.client, context, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "(edited)\revolt_bug.py", line 15, in get_mentions
    await ctx.send(repr(ctx.message.mentions))
                        ^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\site-packages\revolt\message.py", line 152, in mentions
    self.mentions.append(self.server.get_member(mention))
    ^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\site-packages\revolt\message.py", line 152, in mentions
    self.mentions.append(self.server.get_member(mention))
    ^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\site-packages\revolt\message.py", line 152, in mentions
    self.mentions.append(self.server.get_member(mention))
    ^^^^^^^^^^^^^
  [Previous line repeated 985 more times]
RecursionError: maximum recursion depth exceeded

To Reproduce
A small code snippet showing the error

Expected behavior
Return a list of Member objects which the messge is mentioned.

Library version

Name: revolt.py
Version: 0.2.0
Summary: Python wrapper for the revolt.chat API
Home-page: https://github.com/revoltchat/revolt.py
Author:
Author-email: Zomatree <me@zomatree.live>
License: MIT
Location: C:\Program Files\Python312\Lib\site-packages
Requires: aenum, aiohttp, typing-extensions, ulid-py
Required-by:
@defaultuser8848 defaultuser8848 added the unconfirmed bug Something isn't working label Jan 4, 2025
@defaultuser8848
Copy link
Author

It seems like not a bug of current version,I installed it from pypi,so I think that the version on pypi is not same with this.

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

No branches or pull requests

1 participant