Closed akorchyn closed 3 months ago
@race-of-sloths INCLUDE
The recent updates introduce the rand
crate to the project and refactor message handling across multiple modules. Constants for messages have been replaced with arrays of messages, and the reply
method has been enhanced to randomly select a message from these arrays. This change impacts various command files, improving the flexibility and variability of responses in the system.
File(s) | Change Summary |
---|---|
Cargo.toml , server/Cargo.toml |
Added the rand crate to dependencies. |
server/src/commands/actions/finalize.rs |
Modified reply method to use message arrays. |
server/src/commands/actions/merge.rs |
Updated constant from MERGE_MESSAGE to MERGE_MESSAGES and adjusted reply method accordingly. |
server/src/commands/actions/stale.rs |
Updated constant from STALE_MESSAGE to STALE_MESSAGES . |
server/src/commands/common.rs |
Enhanced reply method to select random messages and handle optional comment liking. |
server/src/commands/exclude.rs |
Switched to message arrays for error and reply messages. |
server/src/commands/pause.rs |
Updated various message constants to arrays for pause-related commands. |
server/src/commands/score.rs |
Refactored to use message arrays for score-related replies and errors. |
server/src/commands/start.rs |
Removed msg function, added status struct, and updated reply method to use status messages. |
server/src/commands/unknown.rs |
Changed constant from UNKNOWN_COMMAND to UNKNOWN_COMMAND_MESSAGES for error handling. |
server/src/consts.rs |
Refactored single string constants to arrays of messages for various success and error messages. |
In code we trust, with changes so grand,
New messages now at random's hand.
Fromfinalize
tomerge
andstale
,
Responses vary, they never fail.
Withrand
in place, our code's a delight,
A bunny's work, from day to night.
🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Hey there! 🎉 Your PR is now part of the Race of Sloths. Thanks for contributing! 🙌
Current Status:
@race-of-sloths score [1,2,3,5,8,13]
.We'll keep this status updated as things progress. Thanks again for your awesome contribution! 🌟
@race-of-sloths score 5
@race-of-sloths score 5
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Refactor