internal

package
v0.0.0-...-4a205d6 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Chars = itemMap{
	"random":   0,
	"fish":     1,
	"crystal":  2,
	"eyes":     3,
	"melting":  4,
	"plant":    5,
	"venuz":    6,
	"steroids": 7,
	"robot":    8,
	"chicken":  9,
	"rebel":    10,
	"horror":   11,
	"rogue":    12,
	"bigdog":   13,
	"skeleton": 14,
	"frog":     15,
}

Chars is a map of in-game characters and their corresponding IDs

View Source
var Crowns = itemMap{
	"random":     0,
	"none":       1,
	"death":      2,
	"life":       3,
	"haste":      4,
	"guns":       5,
	"hatred":     6,
	"blood":      7,
	"destiny":    8,
	"love":       9,
	"luck":       10,
	"curses":     11,
	"risk":       12,
	"protection": 13,
}

Crowns is a map of in-game crowns with their corresponding IDs

View Source
var Mutations = itemMap{
	"none":              0,
	"rhino skin":        1,
	"extra feet":        2,
	"plutonium hunger":  3,
	"rabbit paw":        4,
	"throne butt":       5,
	"lucky shot":        6,
	"bloodlust":         7,
	"gamma guts":        8,
	"second stomach":    9,
	"back muscle":       10,
	"scarier face":      11,
	"euphoria":          12,
	"long arms":         13,
	"boiling veins":     14,
	"shotgun shoulders": 15,
	"recycle gland":     16,
	"laser brain":       17,
	"last wish":         18,
	"eagle eyes":        19,
	"impact wrists":     20,
	"bolt marrow":       21,
	"stress":            22,
	"trigger fingers":   23,
	"sharp teeth":       24,
	"patience":          25,
	"hammerhead":        26,
	"strong spirit":     27,
	"open mind":         28,
	"heavy heart":       29,
}

Mutations is a map of in-game mutations with their corresponding IDs

View Source
var Weapons = itemMap{}/* 128 elements not displayed */

Weapons is a map of in-game weapons with their corresponding IDs

Functions

func ElevatedUser

func ElevatedUser(fn router.HandlerFunc) router.HandlerFunc

ElevatedUser checks for elevated admin permissions or bot owner ID

func GetBannedHandler

func GetBannedHandler(db *sql.DB) router.HandlerFunc

GetBannedHandler returns a router handler which checks for banned weekly items

func GetUserSuggestionCount

func GetUserSuggestionCount(db *sql.DB, id string) int

GetUserSuggestionCount returns the requesting users suggestion count

func InsertSuggestion

func InsertSuggestion(db *sql.DB, uid, char, weap, crown string, skin bool) error

InsertSuggestion inserts a weekly suggestion into the database

func IsBanned

func IsBanned(db *sql.DB, char, weap, crown string) (bool, error)

IsBanned checks if one or more items are currently banned from the weekly

func WeeklyBanAdd

func WeeklyBanAdd(db *sql.DB, kind string, val int) error

WeeklyBanAdd adds an item as banned for the weekly unless it already exists in the column

func WeeklyBanDel

func WeeklyBanDel(db *sql.DB, kind string, val int) error

WeeklyBanDel removes an item from the banned list

Types

type Bot

type Bot struct {
	Ses   *discordgo.Session
	DB    *sql.DB
	Route *router.Route
}

Bot ...

func NewBot

func NewBot(ses *discordgo.Session, db *sql.DB, route *router.Route) *Bot

NewBot returns a new Discord bot

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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