Documentation
¶
Index ¶
Constants ¶
View Source
const Check = "<:eodCheck:765333533362225222>"
View Source
const DefaultMark = "None"
View Source
const MaxComboLength = 21
View Source
const NoCheck = "❌"
View Source
const RedCircle = "🔴"
Consts
Variables ¶
View Source
var PostfixSql = map[string]string{
"id": "id::text",
"image": "image",
"color": "color::text",
"creator": "creator",
"createdon": "createdon",
"commenter": "commenter",
"colorer": "colorer",
"imager": "imager",
"treesize": "treesize::text",
}
View Source
var Postfixes = []sevcord.Choice{ sevcord.NewChoice("ID", "id"), sevcord.NewChoice("Image", "image"), sevcord.NewChoice("Color", "color"), sevcord.NewChoice("Creator", "creator"), sevcord.NewChoice("Created On", "createdon"), sevcord.NewChoice("Commenter", "commenter"), sevcord.NewChoice("Colorer", "colorer"), sevcord.NewChoice("Imager", "imager"), sevcord.NewChoice("Tree Size", "treesize"), }
View Source
var SearchTypes = []sevcord.Choice{ sevcord.NewChoice("Prefix", "prefix"), sevcord.NewChoice("Regex", "regex"), }
View Source
var SortSql = map[string]string{
"id": "id",
"name": "name",
"color": "color",
"creator": "creator",
"colorer": "colorer",
"imager": "imager",
"createdon": "createdon",
"treesize": "treesize DESC",
"length": "LENGTH(name) DESC",
"found": "cont DESC, id",
}
View Source
var Sorts = []sevcord.Choice{ sevcord.NewChoice("ID", "id"), sevcord.NewChoice("Name", "name"), sevcord.NewChoice("Color", "color"), sevcord.NewChoice("Creator", "creator"), sevcord.NewChoice("Colorer", "colorer"), sevcord.NewChoice("Imager", "imager"), sevcord.NewChoice("Created On", "createdon"), sevcord.NewChoice("Tree Size", "treesize"), sevcord.NewChoice("Length", "length"), sevcord.NewChoice("Found", "found"), }
Discord util
Functions ¶
func GetPostfixVal ¶
Types ¶
type Config ¶
type Config struct {
Guild string `db:"guild"`
VotingChannel string `db:"voting"`
NewsChannel string `db:"news"`
VoteCnt int `db:"votecnt"`
PollCnt int `db:"pollcnt"`
PlayChannels pq.StringArray `db:"play"`
}
Guilds
type Element ¶
type Element struct {
ID int `db:"id"`
Guild string `db:"guild"`
Name string `db:"name"`
Image string `db:"image"`
Color int `db:"color"`
Comment string `db:"comment"`
Creator string `db:"creator"`
CreatedOn time.Time `db:"createdon"`
Commenter string `db:"commenter"`
Colorer string `db:"colorer"`
Imager string `db:"imager"`
Parents pq.Int32Array `db:"parents"`
TreeSize int `db:"treesize"`
}
Element
type Poll ¶
type Poll struct {
// Filed in by CreatePoll
Guild string `db:"guild"`
Message string `db:"message"`
Channel string `db:"channel"`
Creator string `db:"creator"`
CreatedOn time.Time `db:"createdon"`
Upvotes int `db:"upvotes"`
Downvotes int `db:"downvotes"`
// Required
Kind PollKind `db:"kind"`
Data PgData `db:"data"`
}
type PollKind ¶
type PollKind string
Polls
const ( PollKindCombo PollKind = "combo" PollKindCategorize PollKind = "cat" PollKindUncategorize PollKind = "rmcat" PollKindComment PollKind = "comment" // Use "Sign", not "Comment" PollKindCatComment PollKind = "catcomment" PollKindQueryComment PollKind = "querycomment" PollKindImage PollKind = "img" PollKindCatImage PollKind = "catimg" PollKindQueryImage PollKind = "queryimg" PollKindColor PollKind = "color" PollKindCatColor PollKind = "catcolor" PollKindQueryColor PollKind = "querycolor" PollKindQuery PollKind = "query" PollKindDelQuery PollKind = "delquery" )
type Query ¶
type Query struct {
Guild string `db:"guild"`
Name string `db:"name"`
Creator string `db:"creator"`
Image string `db:"image"`
Color int `db:"color"`
Comment string `db:"comment"`
Imager string `db:"imager"`
Colorer string `db:"colorer"`
Commenter string `db:"commenter"`
CreatedOn time.Time `db:"createdon"`
Kind QueryKind `db:"kind"`
Data PgData `db:"data"`
// After calc
Elements []int
}
type QueryKind ¶
type QueryKind string
const ( QueryKindElement QueryKind = "element" QueryKindCategory QueryKind = "cat" QueryKindProducts QueryKind = "products" QueryKindParents QueryKind = "parents" QueryKindInventory QueryKind = "inv" QueryKindElements QueryKind = "elements" QueryKindRegex QueryKind = "regex" QueryKindComparison QueryKind = "compare" QueryKindOperation QueryKind = "op" )
Click to show internal directories.
Click to hide internal directories.