models

package
v0.0.0-...-938fafe Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndAddPlayerAcc

func CheckAndAddPlayerAcc(userID int, db *sql.DB)

Adds a player if player is not already in DB

func PopulateDictDB

func PopulateDictDB(db *sql.DB)

Populates game_dictionary with all the playable words db = variable with opened database

func SetupDB

func SetupDB(db *sql.DB)

Creates tables used by the bot db = variable with the opened database

Types

type Player

type Player struct {
	XPPoints   int
	GamesWon   int
	GamesLost  int
	LastPlayed string
}

func UserInfo

func UserInfo(userID int, db *sql.DB) (Player, error)

Retrieves user information

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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