https://github.com/velvettoroyashi/remorahelpsystem
A help system for Remora.Discord based on the findings of VelvetThePanda/HelpSystemPOC
https://github.com/velvettoroyashi/remorahelpsystem
Last synced: about 2 months ago
JSON representation
A help system for Remora.Discord based on the findings of VelvetThePanda/HelpSystemPOC
- Host: GitHub
- URL: https://github.com/velvettoroyashi/remorahelpsystem
- Owner: VelvetToroyashi
- License: apache-2.0
- Created: 2022-04-19T06:18:23.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-06T04:03:10.000Z (about 1 year ago)
- Last Synced: 2025-03-23T16:16:58.272Z (about 2 months ago)
- Language: C#
- Homepage:
- Size: 197 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## VTP.RemoraHelpSystem
### What is it?
This repo serves as the basis for an innovative, modular, and extensible
library of components to create a help system for [Remora.Discord](https://github.com/Nihlus/Remora.Discord).This repo is built off of the findings in my [proof-of-concept](https://github.com/VelvetThePanda/HelpSystemPOC)
### What does it do?
In short, it provides components that can be pieced together to construct a full help system, including tree searching,
message formatting, metadata handling, and even dispatching the help message.### How do I use it?
Firstly add `VTP.RemoraHelpSystem` from NuGet to your project.
Then, add the help system:
```cs
var services = new ServiceCollection();services.AddHelpSystem();
```This will register the following into the container:
- TreeWalker
- HelpCommand
- IHelpFormatter
- ICommandHelpService`TreeWalker` is a generic component that simply walks a given tree and returns all the matching nodes.
`ICommandHelpService` is an interface that is used to retrieve help for command(s).
`IHelpFormatter` is an interface used by the default implementation of `ICommandHelpService` to create embeds based on the retrieved nodes.
`HelpCommand` is a command that simply invokes `ICommandHelpService.ShowHelpAsync` based on the user's query.
### I use custom-named trees, what do I do?
That's fine, simply pass the name of the tree you want to register help for:
```cs
services.AddHelpSystem("my_custom_tree");
```### I want to group my commands, what do I do?
Grouping commands is easy, simply mark your command with the `[Category("my cateogory")]` attribute.
Then, on your service collection:
```csharp
services
.Configure(options =>
{
options.CommandCategories.Add("my category");
});
```Now any commands marked with `[Category("my category")]` will be grouped under the category "my category".