bot

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WordleApplicationCommands = []*discordgo.ApplicationCommand{
	{
		Name:        "start",
		Description: "Start a new wordle",
		Type:        discordgo.ChatApplicationCommand,
		Options: []*discordgo.ApplicationCommandOption{
			{
				Name:        "word_length",
				Description: "The length of the word to be used in the wordle",
				Type:        discordgo.ApplicationCommandOptionInteger,
			},
		},
	},
	{
		Name:        "guess",
		Description: "Guess a word in the wordle",
		Type:        discordgo.ChatApplicationCommand,
		Options: []*discordgo.ApplicationCommandOption{
			{
				Name:        "word",
				Description: "The word to guess",
				Type:        discordgo.ApplicationCommandOptionString,
				Required:    true,
			},
		},
	},
	{
		Name:        "stop",
		Description: "Stop the current wordle",
		Type:        discordgo.ChatApplicationCommand,
	},
}

Functions

This section is empty.

Types

type WordleBot

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

func New

func New(commonWords, validWords []string, guessesAllowed int, botToken string) (*WordleBot, error)

func (*WordleBot) Start

func (wb *WordleBot) Start() error

func (*WordleBot) Stop

func (wb *WordleBot) Stop() error

func (*WordleBot) Wordle

func (*WordleBot) WordleGuess

func (wb *WordleBot) WordleGuess(s *discordgo.Session, i *discordgo.InteractionCreate)

func (*WordleBot) WordleStart

func (wb *WordleBot) WordleStart(s *discordgo.Session, i *discordgo.InteractionCreate)

Jump to

Keyboard shortcuts

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