Skip to content

feat(bot-discord): add presence task for dynamic Discord activity#170

Merged
gvieira18 merged 1 commit into3.xfrom
feat/add-rich-presence-task
Feb 16, 2026
Merged

feat(bot-discord): add presence task for dynamic Discord activity#170
gvieira18 merged 1 commit into3.xfrom
feat/add-rich-presence-task

Conversation

@gvieira18
Copy link
Member

@gvieira18 gvieira18 commented Feb 16, 2026

Summary by CodeRabbit

  • New Features
    • Added Discord rich presence functionality that automatically updates the bot's status with rotating activities (listening and watching).

@gvieira18 gvieira18 self-assigned this Feb 16, 2026
@gvieira18 gvieira18 merged commit 8b482d4 into 3.x Feb 16, 2026
5 of 6 checks passed
@gvieira18 gvieira18 deleted the feat/add-rich-presence-task branch February 16, 2026 14:14
@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

📝 Walkthrough

Walkthrough

A new RichPresence task class has been added to app-modules/bot-discord/src/Tasks/RichPresence.php. The class extends Laracord\Tasks\Task and implements Discord presence update functionality. It includes a handle() method that generates a list of Activity objects and selects one randomly to update the Discord presence. A private makeActivities() method creates Activity instances with specific configurations. The class defines a protected $interval property set to 3600 seconds and a protected $eager property set to false.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a new RichPresence task class that manages dynamic Discord activity status updates.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into 3.x

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@app-modules/bot-discord/src/Tasks/RichPresence.php`:
- Line 26: Fix the PHPDoc tag typo in the RichPresence docblock by replacing the
invalid "@returns" tag with the correct "@return" tag so the declaration reads
"@return Activity[]"; locate the docblock above the relevant method or property
in the RichPresence class (the comment currently showing "/** `@returns`
Activity[] */") and update it to use "@return" to conform to PHPDoc standards.

$this->discord()->updatePresence($activities[array_rand($activities)]);
}

/** @returns Activity[] */
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Typo in PHPDoc tag: @returns@return.

@returns is not a recognized PHPDoc tag.

Proposed fix
-    /** `@returns` Activity[] */
+    /** `@return` Activity[] */
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/** @returns Activity[] */
/** `@return` Activity[] */
🤖 Prompt for AI Agents
In `@app-modules/bot-discord/src/Tasks/RichPresence.php` at line 26, Fix the
PHPDoc tag typo in the RichPresence docblock by replacing the invalid "@returns"
tag with the correct "@return" tag so the declaration reads "@return
Activity[]"; locate the docblock above the relevant method or property in the
RichPresence class (the comment currently showing "/** `@returns` Activity[] */")
and update it to use "@return" to conform to PHPDoc standards.

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

Comments