-- | Build a command, ensuring the command response type name and the command
-- function match
buildCommand :: forall a s cxts tags. (ValidResponse a, KnownSymbol s)
  => CommandFunc a
  -> Proxy s
  -> T.Text
  -> [T.Text]
  -> Rec SAcceptedContext cxts
  -> Rec SParamDescription tags
  -> NamedCommand ( 'CommandType s cxts tags )
buildCommand fun n d exts ctxs parm =
  NamedCommand n $
  Command {cmdDesc =
            CommandDesc {cmdName = T.pack $ symbolVal n
                        ,cmdUiDescription = d
                        ,cmdFileExtensions = exts
                        ,cmdContexts = ctxs
                        ,cmdAdditionalParams = parm
                        ,cmdReturnType =
                           T.pack $ show $ typeOf (undefined :: a)}
          ,cmdFunc = fun}
buildCommand :: forall a s cxts tags. (ValidResponse a, KnownSymbol s)
  => CommandFunc a
  -> Proxy s
  -> T.Text
  -> [T.Text]
  -> Rec SAcceptedContext cxts
  -> Rec SParamDescription tags
  -> NamedCommand ( 'CommandType s cxts tags )
buildCommand fun n d exts ctxs parm =
  NamedCommand n $
  Command {cmdDesc =
            CommandDesc {cmdName = T.pack $ symbolVal n
                        ,cmdUiDescription = d
                        ,cmdFileExtensions = exts
                        ,cmdContexts = ctxs
                        ,cmdAdditionalParams = parm
                        ,cmdReturnType =
                           T.pack $ show $ typeOf (undefined :: a)}
          ,cmdFunc = fun}
buildCommand fun n d exts ctxs parm =
  NamedCommand n $
  Command {cmdDesc =
            CommandDesc {cmdName = T.pack $ symbolVal n
                        ,cmdUiDescription = d
                        ,cmdFileExtensions = exts
                        ,cmdContexts = ctxs
                        ,cmdAdditionalParams = parm
                        ,cmdReturnType =
                           T.pack $ show $ typeOf (undefined :: a)}
          ,cmdFunc = fun}