utils

package
v0.0.0-...-c30703a Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InfoDoc = support.CommandDoc{
	Name: "info",
	Doc:  `shows info about the server as from the factorio lobby`,
}
View Source
var ModListDoc = support.CommandDoc{
	Name:  "mods",
	Doc:   `command outputs information about current mods`,
	Usage: "$mods [on | off | all | files]",
	Subcommands: []support.CommandDoc{
		{Name: "on", Doc: `command sends currently enabled mods`},
		{Name: "off", Doc: `command sends currently disabled mods`},
		{Name: "all", Doc: `command sends all mods in mod-list.json`},
		{Name: "files", Doc: `command sends filenames of all downloaded mods`},
	},
}
View Source
var OnlineDoc = support.CommandDoc{
	Name: "online",
	Doc:  `shows players online (and max number of players if set)`,
}
View Source
var VersionDoc = support.CommandDoc{
	Name: "version",
	Doc: `command outputs factorio server version and FactoCord version.
If it says that FactoCord version is unknown look into the error.log`,
}

Functions

func GameInfo

func GameInfo(s *discordgo.Session, _ string)

func GameOnline

func GameOnline(s *discordgo.Session, _ string)

func ModsList

func ModsList(s *discordgo.Session, args string)

ModsList returns the list of mods running on the server.

func VersionString

func VersionString(s *discordgo.Session, _ string)

Types

type Mod

type Mod struct {
	Name    string
	Enabled bool
}

Mod is a struct containing info about a mod.

type ModJson

type ModJson struct {
	Mods []Mod
}

ModJson is struct containing a slice of Mod.

Jump to

Keyboard shortcuts

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