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

DMChannel.is_accepted() is broken #582

Closed
3 tasks done
paulofreitas opened this issue Sep 29, 2023 · 1 comment
Closed
3 tasks done

DMChannel.is_accepted() is broken #582

paulofreitas opened this issue Sep 29, 2023 · 1 comment
Labels
unconfirmed bug Unconfirmed bug

Comments

@paulofreitas
Copy link

Summary

DMChannel.is_accepted() is always returning True for both message requests and regular messages

Reproduction Steps

It should return False by default on message requests, but it's returning True

Code

// ...
for message in bot.private_channels:
    print(f'{message=}')
    print(f'{message.is_spam()=}')
    print(f'{message.is_message_request()=}')
    print(f'{message.is_accepted()=}')
// ...

Expected Results

message.is_accepted() should return False whenever message.is_message_request() is True and message.accept() wasn't called

Actual Results

message.is_accepted() is always returning True when message.is_message_request() is True, but this is clearly not the intended behavior - it should return False if message.is_message_request() is True and True if message.is_message_request() is False

System Information

  • Python v3.11.5-final
  • selfcord.py v2.1.0-alpha
    • selfcord.py metadata: v2.1.0a4381+gd1d11bd3
  • aiohttp v3.8.4
  • system info: Linux 5.15.90.1-microsoft-standard-WSL2 ✨ add trusted users kwarg to bot class #1 SMP Fri Jan 27 02:56:13 UTC 2023

Checklist

  • I have searched the open issues for duplicates.
  • I have shared the entire traceback.
  • I am using a user token (and it isn't visible in the code).

Additional Information

No response

@paulofreitas
Copy link
Author

Fixed in #583

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

No branches or pull requests

1 participant