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

Fix message events for DMs #1854

Merged
merged 5 commits into from
May 28, 2021
Merged

Conversation

SubZero0
Copy link
Member

@SubZero0 SubZero0 commented May 26, 2021

Summary

DM channels aren't cached anymore and won't be found, causing several message events to not fire.

Changes

Properties

  • Removed DiscordSocketConfig.ExclusiveBulkDelete, now each is their own event and bulk won't be redirected to single

Methods

  • Added DiscordSocketClient.GetChannelAsync
  • Added DiscordSocketClient.GetUserAsync
  • Changed IDiscordClient.GetChannelAsync in DiscordSocketClient to fallback to rest if it's not in cache
  • Changed IDiscordClient.GetUserAsync in DiscordSocketClient to fallback to rest if it's not in cache

Events

  • Changed event signature for MessageDeleted:
    Old: Cacheable<IMessage, ulong>, ISocketMessageChannel, Task
    New: Cacheable<IMessage, ulong>, Cacheable<IMessageChannel, ulong>, Task
  • Changed event signature for MessagesBulkDeleted:
    Old: IReadOnlyCollection<Cacheable<IMessage, ulong>>, ISocketMessageChannel, Task
    New: IReadOnlyCollection<Cacheable<IMessage, ulong>>, Cacheable<IMessageChannel, ulong>, Task
  • Changed event signature for ReactionAdded:
    Old: Cacheable<IUserMessage, ulong>, ISocketMessageChannel, SocketReaction, Task
    New: Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, SocketReaction, Task
  • Changed event signature for ReactionRemoved:
    Old: Cacheable<IUserMessage, ulong>, ISocketMessageChannel, SocketReaction, Task
    New: Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, SocketReaction, Task
  • Changed event signature for ReactionsCleared:
    Old: Cacheable<IUserMessage, ulong>, ISocketMessageChannel, Task
    New: Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, Task
  • Changed event signature for ReactionsRemovedForEmote:
    Old: Cacheable<IUserMessage, ulong>, ISocketMessageChannel, IEmote, Task
    New: Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, IEmote, Task
  • Changed event signature for UserIsTyping:
    Old: SocketUser, ISocketMessageChannel, Task
    New: Cacheable<IUser, ulong>, Cacheable<IMessageChannel, ulong>, Task

Todo

  • MessageUpdated
  • MessageDeleted
  • MessageBulkDeleted
  • ReactionAdded
  • ReactionRemoved
  • ReactionsCleared
  • ReactionsRemovedForEmote
  • UserIsTyping

@SubZero0 SubZero0 changed the title Fix MessageUpdate for DMs Fix message events for DMs May 27, 2021
@SubZero0 SubZero0 merged commit a7ff6ce into discord-net:dev May 28, 2021
@SubZero0 SubZero0 deleted the fix-message-update branch May 28, 2021 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant