Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jonas747/yagpdb
Browse files Browse the repository at this point in the history
  • Loading branch information
jogramming committed Feb 17, 2020
2 parents ae8d880 + 490be9e commit db811b6
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 0 deletions.
116 changes: 116 additions & 0 deletions common/nouns.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// this package provides core functinality to yagpdb, important security stuff here
package common

var Nouns = []string{
"action",
"admin",
"age",
"amulet",
"area",
"army",
"body",
"book",
"box",
"boy",
"car",
"case",
"central",
"century",
"charge",
"child",
"church",
"city",
"company",
"council",
"court",
"date",
"daughter",
"day",
"death",
"drums",
"enchantment",
"end",
"example",
"experience",
"face",
"fact",
"family",
"father",
"fish",
"food",
"friend",
"fruit",
"future",
"girl",
"god",
"group",
"hand",
"head",
"health",
"heart",
"home",
"hospital",
"hour",
"house",
"husband",
"idea",
"info",
"job",
"king",
"land",
"law",
"letter",
"level",
"life",
"list",
"man",
"market",
"money",
"mother",
"music",
"night",
"office",
"oil",
"part",
"party",
"past",
"person",
"place",
"planet",
"police",
"power",
"practice",
"problem",
"queen",
"question",
"radio",
"rate",
"result",
"road",
"robot",
"room",
"school",
"service",
"side",
"society",
"son",
"song",
"spell",
"staff",
"stone",
"sword",
"system",
"team",
"thing",
"time",
"vegetable",
"wall",
"war",
"water",
"way",
"wife",
"woman",
"work",
"world",
"year",
}
1 change: 1 addition & 0 deletions common/templates/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ var (
"inFold": inFold,
"roleAbove": roleIsAbove,
"adjective": common.RandomAdjective,
"noun": common.RandomNoun,
"randInt": randInt,
"shuffle": shuffle,
"seq": sequence,
Expand Down
4 changes: 4 additions & 0 deletions common/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ func RandomAdjective() string {
return Adjectives[rand.Intn(len(Adjectives))]
}

func RandomNoun() string {
return Nouns[rand.Intn(len(Nouns))]
}

type DurationFormatPrecision int

const (
Expand Down

0 comments on commit db811b6

Please sign in to comment.