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::Players
 
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 91 of file CommandBuilder.hpp.

Member Data Documentation

◆ Access

CommandAccess VoltMod::CommandDefinition::Access = CommandAccess::Players

◆ Aliases

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

Definition at line 94 of file CommandBuilder.hpp.

Referenced by VoltMod::CommandBuilder::Alias().

◆ Args

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

Definition at line 101 of file CommandBuilder.hpp.

◆ Description

std::string VoltMod::CommandDefinition::Description

Definition at line 95 of file CommandBuilder.hpp.

Referenced by VoltMod::CommandBuilder::Describe().

◆ 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 104 of file CommandBuilder.hpp.

◆ Name

std::string VoltMod::CommandDefinition::Name

Definition at line 93 of file CommandBuilder.hpp.

Referenced by VoltMod::CommandBuilder::CommandBuilder().

◆ PermissionName

std::string VoltMod::CommandDefinition::PermissionName

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

Definition at line 97 of file CommandBuilder.hpp.

Referenced by VoltMod::CommandBuilder::Permission().

◆ UsageKey

std::string VoltMod::CommandDefinition::UsageKey

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

Definition at line 99 of file CommandBuilder.hpp.

Referenced by VoltMod::CommandBuilder::UsageKey().


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