Skip to content

Conversation

@gehongyan
Copy link
Owner

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

  • Added KMarkdownMentionEveryone() and KMarkdownMentionHere() methods to MentionUtils for generating KMarkdown-formatted mentions of all members and online members.
  • Added PlainTextMentionEveryone() and PlainTextMentionHere() methods to MentionUtils for generating plain text mentions of all members and online members.

Role Entity Refactoring

  • Updated RestRole.KMarkdownMention and RestRole.PlainTextMention to use the new mention utility methods when the role is "everyone", improving consistency and code reuse.
  • Updated SocketRole.KMarkdownMention and SocketRole.PlainTextMention to use the new mention utility methods for "everyone" mentions, ensuring standardized output across implementations.

Copilot AI review requested due to automatic review settings January 7, 2026 02:11
@gehongyan gehongyan self-assigned this Jan 7, 2026
@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Test Results (All Platforms)

    9 files  ±0      9 suites  ±0   5s ⏱️ -1s
  367 tests +2    367 ✅ +2  0 💤 ±0  0 ❌ ±0 
1 104 runs  +6  1 104 ✅ +6  0 💤 ±0  0 ❌ ±0 

Results for commit 36913a9. ± Comparison against base commit e1a2a4c.

♻️ This comment has been updated with latest results.

Copy link
Contributor

Copilot AI left a 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 MentionUtils for "everyone" and "here" mentions
  • Refactored RestRole and SocketRole classes 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.

Copy link
Contributor

Copilot AI left a 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.

@gehongyan gehongyan merged commit 029737c into master Jan 7, 2026
13 checks passed
@gehongyan gehongyan deleted the fix-mention-everyone branch January 7, 2026 09:27
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.

2 participants