MafiaGame

package
v0.0.0-...-beb0b46 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command int
const (
	Clear Command = iota
	Winner
	Score
	Leaderboard
	Join
	Vote
	NumMafia
	Start
	Help
	SetPrefix
)

func Parse

func Parse(input string) (Command, []string)

type MafiaGame

type MafiaGame struct {
	Guild      string
	Prefix     string
	Players    []MafiaPlayer
	NumMafia   int
	InProgress bool
}

func New

func New(guild string) *MafiaGame

func (*MafiaGame) Clear

func (m *MafiaGame) Clear() string

func (*MafiaGame) Help

func (m *MafiaGame) Help() string

func (*MafiaGame) Join

func (m *MafiaGame) Join(playerID string) string

func (*MafiaGame) LeaderBoard

func (m *MafiaGame) LeaderBoard() string

func (*MafiaGame) Score

func (m *MafiaGame) Score(playerID string) string

func (*MafiaGame) SetNumMafia

func (m *MafiaGame) SetNumMafia(args []string) string

func (*MafiaGame) SetPrefix

func (m *MafiaGame) SetPrefix(args []string) string

func (*MafiaGame) Start

func (m *MafiaGame) Start(s *discordgo.Session) string

func (*MafiaGame) Vote

func (m *MafiaGame) Vote(playerID string, args []string) string

func (*MafiaGame) Winner

func (m *MafiaGame) Winner(args []string) string

type MafiaPlayer

type MafiaPlayer struct {
	ID string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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