Skip to content

feat(RM-76): Allow blank status & add Custom & Competing status#21

Merged
BenHall-1 merged 3 commits intoTicketsBot-cloud:masterfrom
DanPlayz0:feat/more-statuses
May 15, 2025
Merged

feat(RM-76): Allow blank status & add Custom & Competing status#21
BenHall-1 merged 3 commits intoTicketsBot-cloud:masterfrom
DanPlayz0:feat/more-statuses

Conversation

@DanPlayz0
Copy link
Copy Markdown
Contributor

This PR relies on a PR to TicketsBot-cloud/tickets.rs#1 for the custom status state property to be set per the discord docs.

This pull request introduces a new feature to allow users to delete their whitelabel bot status, expands the available status types, and updates the frontend to support these changes. The most important changes include adding a new API endpoint for deleting statuses, integrating this endpoint into the frontend, and adding new status types to the existing functionality.

Backend Changes:

  • New API Endpoint for Deleting Whitelabel Bot Status: Added the WhitelabelStatusDelete function in app/http/endpoints/api/whitelabel/whitelabelstatusdelete.go to handle DELETE requests for removing a bot's status. This includes database updates and publishing status changes to the sharder.
  • Route Registration: Registered the new DELETE /status route in StartServer to connect the endpoint to the server.

Status Type Enhancements:

  • Additional Status Types: Added "Competing" and "Custom" as valid status types in WhitelabelStatusPost to expand the range of activities users can set.

Frontend Changes:

  • Dropdown Options Update: Updated the Whitelabel.svelte dropdown to include "Competing" and "Custom" status options.
  • Delete Status Button: Added a "Clear Status" button in Whitelabel.svelte that appears conditionally when a status is set.
  • Delete Status Functionality: Implemented the deleteStatus function in Whitelabel.svelte to send DELETE requests to the new API endpoint and handle success or error notifications.

@DanPlayz0 DanPlayz0 changed the title fix(RM-76): Allow blank status & add Custom & Competing status feat(RM-76): Allow blank status & add Custom & Competing status May 15, 2025
@BenHall-1 BenHall-1 merged commit 953ecde into TicketsBot-cloud:master May 15, 2025
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.

2 participants