Small tweaks to the web api
This commit is contained in:
parent
4a11ce6207
commit
3004b19209
5 changed files with 25 additions and 10 deletions
|
@ -2,19 +2,16 @@
|
|||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Geekbot.net.Lib;
|
||||
using Nancy;
|
||||
|
||||
namespace Geekbot.net.WebApi.Help
|
||||
{
|
||||
public class HelpController : NancyModule
|
||||
public sealed class HelpController : NancyModule
|
||||
{
|
||||
public HelpController()
|
||||
public HelpController(CommandService commands)
|
||||
{
|
||||
Get("/v1/commands", args =>
|
||||
{
|
||||
var commands = GetCommands().Result;
|
||||
|
||||
var commandList = (from cmd in commands.Commands
|
||||
let cmdParamsObj = cmd.Parameters.Select(cmdParam => new CommandParamDto
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue