Skip to content

fix: weekly update reminder#31

Merged
torrid-fish merged 1 commit into
mainfrom
feat/weekly-remind
Jan 29, 2026
Merged

fix: weekly update reminder#31
torrid-fish merged 1 commit into
mainfrom
feat/weekly-remind

Conversation

@torrid-fish

@torrid-fish torrid-fish commented Jan 26, 2026

Copy link
Copy Markdown
Member

目的

因為我們忘記開啟intent,所以導致role.members拿到的是一個empty list,所以追殺熊沒有正常運作

方法/實作說明

解決方法就是把設定頁開啟Members Intent,並且在bot.py裡面設定好intent即可
image

intents.members = True

在這裡也一併先把 print 改成 logger,並且配合 rich 的 RichHandler 來讓 logging 更好讀一些

關聯 Issue

Close #29

附註

@wade00754 先 review 這支,我等這支被 merge 進 main 之後我會再 rebase #32 ,到時候再麻煩你幫我 review 那邊的了

@github-actions

Copy link
Copy Markdown

🛡️ PR Quality Check Summary

PR Title: Passed (Length: 27/75, Format: OK). fix: weekly update reminder
Branch Name: Follows naming convention (feat/weekly-remind)
Commit Messages: All 1 commit(s) passed (Length, Format, Case)
Conflicts: No merge conflict markers found
Python Quality: All checks passed.


🎉 All checks passed!

@torrid-fish torrid-fish marked this pull request as ready for review January 26, 2026 16:33
Copilot AI review requested due to automatic review settings January 26, 2026 16:33
@torrid-fish torrid-fish enabled auto-merge January 26, 2026 16:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the weekly update reminder functionality by enabling the Members Intent, which was causing role.members to return an empty list. The PR also introduces logging with the rich library for better readability.

Changes:

  • Enabled Members Intent in bot.py to allow accessing guild member information
  • Replaced print statements with structured logging using Python's logging module and RichHandler from the rich library
  • Added debug logging to track message checking and member verification
  • Added error checks for empty role members to aid debugging

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
bot.py Enabled Members Intent by setting intents.members = True to fix the empty role.members issue
cogs/weekly_update_reminder.py Added logging configuration with RichHandler, replaced isinstance check, added debug logging and error checks for troubleshooting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cogs/weekly_update_reminder.py
Comment thread cogs/weekly_update_reminder.py
Comment thread cogs/weekly_update_reminder.py
Comment thread cogs/weekly_update_reminder.py
Comment thread cogs/weekly_update_reminder.py

@wade00754 wade00754 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the log feature!

@torrid-fish torrid-fish added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit 4d2ed73 Jan 29, 2026
30 checks passed
@torrid-fish torrid-fish deleted the feat/weekly-remind branch January 29, 2026 07:31
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.

熊熊weekly update追殺功能

3 participants