-
Notifications
You must be signed in to change notification settings - Fork 5
Fix everyone role mention #31
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request introduces utility methods for mentioning "everyone" and "here" in KMarkdown and plain text formats, refactoring existing role mention logic to use these centralized methods for improved consistency and maintainability.
- Added four new utility methods to
MentionUtilsfor "everyone" and "here" mentions - Refactored
RestRoleandSocketRoleclasses to use the new utility methods instead of hardcoded strings
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Kook.Net.Core/Utils/MentionUtils.cs | Added KMarkdownMentionEveryone(), KMarkdownMentionHere(), PlainTextMentionEveryone(), and PlainTextMentionHere() utility methods with proper documentation |
| src/Kook.Net.Rest/Entities/Roles/RestRole.cs | Updated KMarkdownMention and PlainTextMention properties to use new utility methods for "everyone" role |
| src/Kook.Net.WebSocket/Entities/Roles/SocketRole.cs | Updated KMarkdownMention and PlainTextMention properties to use new utility methods for "everyone" role |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request adds utility methods for mentioning "everyone" and "here" in both KMarkdown and plain text formats, and refactors existing role mention logic to use these new methods for consistency and maintainability.
Mention Utility Enhancements
KMarkdownMentionEveryone()andKMarkdownMentionHere()methods toMentionUtilsfor generating KMarkdown-formatted mentions of all members and online members.PlainTextMentionEveryone()andPlainTextMentionHere()methods toMentionUtilsfor generating plain text mentions of all members and online members.Role Entity Refactoring
RestRole.KMarkdownMentionandRestRole.PlainTextMentionto use the new mention utility methods when the role is "everyone", improving consistency and code reuse.SocketRole.KMarkdownMentionandSocketRole.PlainTextMentionto use the new mention utility methods for "everyone" mentions, ensuring standardized output across implementations.