Skip to content

fix: Use raw message_id instead of ctx.message.id in wait_for_component#1759

Merged
silasary merged 1 commit intostablefrom
wait-for-message-id
Apr 4, 2025
Merged

fix: Use raw message_id instead of ctx.message.id in wait_for_component#1759
silasary merged 1 commit intostablefrom
wait-for-message-id

Conversation

@silasary
Copy link
Copy Markdown
Member

@silasary silasary commented Mar 6, 2025

Pull Request Type

  • Feature addition
  • Bugfix
  • Documentation update
  • Code refactor
  • Tests improvement
  • CI/CD pipeline enhancement
  • Other: [Replace with a description]

Description

I've noticed that sometimes the Message will be None, throwing an error. This usually happens when using wait_for_component on Ephemeral messages with a long or non-existent timeout.

This switches the ID check to directly reference the message_id, rather than going through a cache lookup that may fail.

Changes

  • Changed a dot to an underscore.

Related Issues

Test Scenarios

Python Compatibility

  • I've ensured my code works on Python 3.10.x
  • I've ensured my code works on Python 3.11.x

Checklist

  • I've run the pre-commit code linter over all edited files
  • I've tested my changes on supported Python versions
  • I've added tests for my code, if applicable
  • I've updated / added documentation, where applicable

@silasary silasary merged commit 7ba0c11 into stable Apr 4, 2025
@silasary silasary deleted the wait-for-message-id branch April 4, 2025 02:11
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