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

Reacting with ❌ doesn't delete generations in DMs #14

Closed
Kilvoctu opened this issue Oct 26, 2022 · 1 comment
Closed

Reacting with ❌ doesn't delete generations in DMs #14

Kilvoctu opened this issue Oct 26, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Kilvoctu
Copy link
Owner

The bot is able to delete its generations in Discord servers, but not DMs.
It will throw this error

Traceback (most recent call last):
  File "D:\StableDiffusion\aiyabot-git\venv\lib\site-packages\discord\client.py", line 377, in _run_event
    await coro(*args, **kwargs)
  File "D:\StableDiffusion\aiyabot-git\aiya.py", line 74, in on_raw_reaction_add
    message = await self.get_channel(ctx.channel_id).fetch_message(ctx.message_id)
AttributeError: 'NoneType' object has no attribute 'fetch_message'
@Kilvoctu Kilvoctu added bug Something isn't working help wanted Extra attention is needed labels Oct 26, 2022
Kilvoctu added a commit that referenced this issue Oct 29, 2022
@Kilvoctu Kilvoctu removed the help wanted Extra attention is needed label Oct 29, 2022
Kilvoctu added a commit that referenced this issue Oct 29, 2022
just make a json file for all DMs.
also fix some formatting with current_settings output
@Kilvoctu
Copy link
Owner Author

Couldn't figure this out, but fortunately there are people way smarter than me.

Used given solution from my own question on stackoverflow. Test to make sure the intended behavior works: bot will delete generated images.

Bug: the bot can delete any of its own messages which contain an embed. This should only affects DMs, and the only other type of message with an embed is /stats, so I'm not too concerned about it at the moment.

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

No branches or pull requests

1 participant