Skip to content

Commit

Permalink
fix: Re-add explicit implementation for mentions
Browse files Browse the repository at this point in the history
Apparently it isn't enough to simply use `new` with a different type, at least in C#12
  • Loading branch information
VelvetToroyashi committed Nov 3, 2024
1 parent 1830265 commit 2258871
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,12 @@ public interface IMessageUpdate : IMessage, IGatewayEvent
/// without requiring bots to keep member state in memory.
/// </summary>
Optional<IPartialGuildMember> Member { get; }

/// <summary>
/// Gets a list of users mentioned in the message.
/// </summary>
new IReadOnlyList<IUserMention> Mentions { get; }

/// <inheritdoc/>
IReadOnlyList<IUser> IMessage.Mentions => this.Mentions;
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public record MessageUpdate
(
Optional<Snowflake> GuildID,
Optional<IPartialGuildMember> Member,
IReadOnlyList<IUser> Mentions,
IReadOnlyList<IUserMention> Mentions,
Snowflake ID,
Snowflake ChannelID,
IUser Author,
Expand Down

0 comments on commit 2258871

Please sign in to comment.