CS5500-S-2023 / team-bear

team-bear created by GitHub Classroom
0 stars 0 forks source link

Add search listing and sorting command #116

Closed hanchenz closed 1 year ago

hanchenz commented 1 year ago
Topic | Criteria (What to include in each row) -- | -- User Story | Add search listing command and sort the result with price/date Dependencies | Listing controller, slashCommandHandler, StringSelectHandler Plan/Design Process | Add string selection menu for user to choose sorting option and sorting order. Send result to user's DM Code | String select menu, sorting logic, slash command Acceptance Criteria | Sorting works and UI is intuitive. Listings are correctly sorted and user-friendly selection process.

-Add search listing command so users can input a keyword and search the listings that include the keyword in titles -Add sorting logic. Users will receive a private message asking if they want to sort the search result with price, date or None. If choosing None listings will be returned. Else, the users will be asked to choose ascending/descending for the sorting order. The sorted listings will be returned.

hanchenz commented 1 year ago

-Choice selection will be sent to the channel now. -Global variables are removed, choice and keyword are passed using button Id -Add exception throwing. -Function further separated to improve readability.