commands

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package commands provides GCI command entrypoints other than voice commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatListener

type ChatListener struct {
	// contains filtered or unexported fields
}

ChatListener listens for commands from the in-game chat.

func NewChatListener

func NewChatListener(
	coalition secoalition.Coalition,
	callsign string,
	missionClient mission.MissionServiceClient,
	coalitionClient grpccoalition.CoalitionServiceClient,
	netClient net.NetServiceClient,
) *ChatListener

NewChatListener creates a new ChatListener.

func (*ChatListener) Run

func (l *ChatListener) Run(ctx context.Context, messages chan<- Request)

Run monitors the in-game chat for commands.

type Request

type Request struct {
	// TraceID of the request.
	TraceID string
	// PlayerName is the name of the player that sent the message.
	PlayerName string
	// Text message.
	Text string
}

Request is an envelope containing a trace ID, player name and text message.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL