VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
VoltMod::CommandDefinition Struct Reference

One command as the builder assembled it. More...

#include <CommandBuilder.hpp>

Public Attributes

std::string Name
std::vector< std::string > Aliases
std::string Description
std::string PermissionName
std::string UsageKey
CommandAccess Access = CommandAccess::Chat
std::vector< ArgDesc > Args
std::function< Result< Reply >(const Caller &, std::span< const BoundArg >)> Invoke

Detailed Description

One command as the builder assembled it.

The engine-free command definition built by CommandBuilder and installed by CommandManager.

Definition at line 93 of file CommandBuilder.hpp.

Member Data Documentation

◆ Access

CommandAccess VoltMod::CommandDefinition::Access = CommandAccess::Chat

◆ Aliases

std::vector<std::string> VoltMod::CommandDefinition::Aliases

Definition at line 96 of file CommandBuilder.hpp.

Referenced by VoltMod::CommandRouter::Add().

◆ Args

std::vector<ArgDesc> VoltMod::CommandDefinition::Args

Definition at line 103 of file CommandBuilder.hpp.

Referenced by VoltMod::BindArgs(), and VoltMod::CommandRouter::Dispatch().

◆ Description

std::string VoltMod::CommandDefinition::Description

Definition at line 97 of file CommandBuilder.hpp.

◆ Invoke

std::function<Result<Reply>(const Caller&, std::span<const BoundArg>)> VoltMod::CommandDefinition::Invoke

The type-erased handler: unpacks bound back into the parameter list it was written with. Built by CommandBuilder::Run.

Definition at line 106 of file CommandBuilder.hpp.

Referenced by VoltMod::CommandRouter::Dispatch().

◆ Name

std::string VoltMod::CommandDefinition::Name

Definition at line 95 of file CommandBuilder.hpp.

Referenced by VoltMod::CommandRouter::Add().

◆ PermissionName

std::string VoltMod::CommandDefinition::PermissionName

Empty means no permission check. Never checked when the server runs the command.

Definition at line 99 of file CommandBuilder.hpp.

Referenced by VoltMod::CommandRouter::Dispatch().

◆ UsageKey

std::string VoltMod::CommandDefinition::UsageKey

Translation key for the whole usage line; empty derives one from Args.

Definition at line 101 of file CommandBuilder.hpp.

Referenced by VoltMod::CommandRouter::Usage().


The documentation for this struct was generated from the following file: