Isolate SimplyJPK's Tip Service from his feat/misc-improvements branch#316
Conversation
Feature branch to isolate SimplyJPK's TipService and provide upstream to UDC-Bot:master.
Merge SimplyJPK's Tip Service Settings.cs
🚀 Deploy this PR to an environmentYou can deploy this PR to either development or staging environment:
Alternatively, you can:
|
|
/deploy_dev |
|
🚀 Starting deployment of |
There was a problem hiding this comment.
Pull Request Overview
This PR isolates the Tip Service from SimplyJPK's feat/misc-improvements branch by introducing a dedicated tip service with independent settings and endpoints.
- Introduces new tip-related settings in Settings.cs
- Implements TipService with functionalities to add and retrieve tips
- Updates Program.cs and adds TipModule to expose tip commands
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| DiscordBot/Settings/Deserialized/Settings.cs | Adds tip service configuration settings |
| DiscordBot/Services/Tips/TipService.cs | Implements tip service with tip storage and logging |
| DiscordBot/Services/Tips/Components/Tip.cs | Defines the Tip model |
| DiscordBot/Program.cs | Registers TipService for dependency injection |
| DiscordBot/Modules/TipModule.cs | Exposes tip retrieval and addition commands |
|
The dev bot needs a new setting for TipImageDirectory which means it should probably also have a new directory made for it. It's "running" safely without it by saying "TipImageDirectory not set, service will not run." I can continue testing once the folder exists and the bot knows where it is. |
|
/deploy_dev |
|
🚀 Starting deployment of |
|
Tested, no crashes, no issues found. Ready to merge as a baseline. Will expand and do light cleanup from here. |
Require moderator just to use !tip until released. Fix TipHelp command copy/paste mistake.
* break out rules for valid keywords, attachments * give error messages for invalid provided arguments * detect and ignore empty tips
* Added an Id property for editing/removing tips later. Without this, you'd have to remove multiple tips based on a keyword search. With this, however, we now have to show the Id property in any editing interfaces. It's up to the service how to choose values for Id.
* size of attachment moves into the rule check function
* using Discord namespace.
* pull Json serialization out of AddTip * add CommitTipDatabase to save json to file * add DumpTipDatabase to return json for debugging
Added draft implementations of commands: * removetip * dumptips * tiphelp
Since it has an error message, RemoveTip is async. Still no implementation.
First work Tip database searches, dumps, removals
|
🚀 Starting deployment of |
|
/deploy_dev |
|
🚀 Starting deployment of |
|
/deploy_dev |
|
🚀 Starting deployment of |
|
/deploy_dev |
|
🚀 Starting deployment of |
|
/deploy_dev |
|
🚀 Starting deployment of |
|
/deploy_dev |
|
🚀 Starting deployment of |
d0a4338
into
Unity-Developer-Community:master
Isolate SimplyJPK's Tip Service from his feat/misc-improvements branch.