Conversation
- Bump Bevy dependencies to 0.17 - Update code and docs to use Message/MessageReader/MessageWriter - Replace add_event with add_message in plugins - Update examples and README for new Bevy API - Update author and edition in Cargo.toml - Document compatibility with Bevy 0.17
- Rename `events` module to `messages` throughout the codebase - Rename all event types and macros to use "Message" instead of "Event" - Update imports, macro usages, and type names in all affected files - Update documentation and comments to reflect new naming conventions - Add `bot_cache` feature to `full` feature in Cargo.toml
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Bevy Discord plugin to be compatible with Bevy version 0.17, transitioning from Bevy's Events system to the new Messages system. The update includes renaming of types, system sets, and updating dependency versions.
Key changes include:
- Migration from Bevy Events to Messages API
- Updated Bevy dependency from 0.16 to 0.17
- Renamed system sets and handler structures for consistency
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/rich_presence/mod.rs | Updated to use Messages API instead of Events, changed system set names |
| src/rich_presence/event_handlers.rs | Renamed EventHandler to MessageHandler, updated message sending macros |
| src/res.rs | Added documentation comments for public fields |
| src/messages.rs | Complete migration from Events to Messages system with renamed message types |
| src/lib.rs | Updated module name from events to messages, renamed DiscordSet to DiscordSystems |
| src/common.rs | Updated macros to work with Messages instead of Events |
| src/bot/mod.rs | Updated to use Messages API and new system set names |
| src/bot/handle.rs | Updated event handler to use message sending instead of event sending |
| src/bot/event_handlers.rs | Updated function name and parameter types for Messages API |
| examples/*.rs | Updated examples to use new Messages API and renamed types |
| README.md | Updated examples and version compatibility table |
| Cargo.toml | Updated Bevy dependencies to 0.17, version bump to 0.7.0 |
| .github/workflows/*.yml | Added libwayland-dev dependency for CI |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| // TODO: Is the name good?? | ||
| #[derive(Message)] | ||
| pub struct DiscordMessage { |
There was a problem hiding this comment.
TODO comment should be resolved. Consider renaming to MessageCreateMessage or BotMessageMessage to be more specific about the Discord message creation event, or document why DiscordMessage is the preferred name.
| // TODO: Is the name good?? | |
| #[derive(Message)] | |
| pub struct DiscordMessage { | |
| /// | |
| /// This message is dispatched specifically for Discord message creation events. | |
| #[derive(Message)] | |
| pub struct MessageCreateMessage { |
| // TODO: Is the name good?? | ||
| #[derive(Message)] | ||
| pub struct DiscordMessageDeleteMessage { |
There was a problem hiding this comment.
TODO comment should be resolved. The current name DiscordMessageDeleteMessage is redundant. Consider renaming to MessageDeleteMessage for consistency.
| // TODO: Is the name good?? | |
| #[derive(Message)] | |
| pub struct DiscordMessageDeleteMessage { | |
| #[derive(Message)] | |
| pub struct MessageDeleteMessage { |
| // TODO: Is the name good?? | ||
| #[derive(Message)] | ||
| pub struct DiscordMessageDeleteBulkMessage { |
There was a problem hiding this comment.
TODO comment should be resolved. The current name DiscordMessageDeleteBulkMessage is redundant. Consider renaming to MessageDeleteBulkMessage for consistency.
| // TODO: Is the name good?? | |
| #[derive(Message)] | |
| pub struct DiscordMessageDeleteBulkMessage { | |
| // Renamed for consistency: MessageDeleteBulkMessage | |
| #[derive(Message)] | |
| pub struct MessageDeleteBulkMessage { |
| // TODO: Is the name good?? | ||
| #[derive(Message)] | ||
| pub struct DiscordMessageUpdateMessage { |
There was a problem hiding this comment.
TODO comment should be resolved. The current name DiscordMessageUpdateMessage is redundant. Consider renaming to MessageUpdateMessage for consistency.
| // TODO: Is the name good?? | |
| #[derive(Message)] | |
| pub struct DiscordMessageUpdateMessage { | |
| /// Dispatched when a message is updated. | |
| #[derive(Message)] | |
| pub struct MessageUpdateMessage { |
No description provided.