]> git.lizzy.rs Git - furrybot-discord.git/blob - random.js
11c387e012b5a15bf54526b1c5ae0a61282f60ef
[furrybot-discord.git] / random.js
1 const common = require("./common.js")
2
3 module.exports = {
4         rolldice: {
5                 func: msg => msg.channel.send(`<@!${msg.author.id}> rolled a dice and got a ${1 + Math.floor(Math.random() * 6)}.`)
6         },
7         coinflip: {
8                 func: msg => msg.channel.send(`<@!${msg.author.id}> flipped a coin and got ${common.choose(["Heads", "Tails"])}.`)
9         }
10 }
11 /*
12 furrybot.commands.rolldice = {
13         func = function(name)
14                 furrybot.ping_message(name, "rolled a dice and got a " .. furrybot.random(1, 6, furrybot.colors.system) .. ".", furrybot.colors.system)
15         end,
16 }
17
18 furrybot.commands.coinflip = {
19         func = function(name)
20                 furrybot.ping_message(name, "flipped a coin and got " .. furrybot.choose({"Heads", "Tails"}, furrybot.colors.system) .. ".", furrybot.colors.system)
21         end,
22 }
23
24 furrybot.commands.choose = {
25         func = function(name, ...)
26                 local options = {...}
27                 if #options > 1 then
28                         furrybot.ping_message(name, "I choose " .. furrybot.choose(options, "", furrybot.colors.system) .. ".", furrybot.colors.system)
29                 else
30                         furrybot.error_message(name, "Not enough options")
31                 end
32         end,
33 }
34
35 furrybot.commands.uwu = {
36         func = function()
37                 local msg = ""
38
39                 local m = math.random(10)
40
41                 for i = 1, m do
42                         local u_list = {"u", "ü", "o", "ö"}
43
44                         local u = u_list[math.random(#u_list)]
45                         local w = "w"
46
47                         if math.random() < 0.5 then
48                                 u = u:upper()
49                         end
50
51                         if math.random() < 0.5 then
52                                 w = w:upper()
53                         end
54
55                         msg = msg .. u .. w .. u
56
57                         if i ~= m then
58                                 msg = msg .. " "
59                         end
60                 end
61
62                 furrybot.send(msg, furrybot.colors.system)
63         end,
64 }
65
66 furrybot.commands.extinct = {
67         func = function(name, species)
68                 if species then
69                         species = furrybot.uppercase(species .. (species:sub(#species, #species):lower() == "s" and "" or "s"))
70                         furrybot.ping_message(name, species  .. " are " .. (furrybot.strrandom(species, 420, 0, 1) == 0 and "not " or "") .. "extinct." , furrybot.colors.system)
71                 else
72                         furrybot.error_message(name, "You need to specify a species")
73                 end
74         end,
75 }
76
77 furrybot.commands.german = {
78         func = function(name)
79                 local messages = {
80                         "Schnauze!",
81                         "Sprich Deutsch, du Hurensohn!",
82                         "NEIN NEIN NEIN NEIN NEIN NEIN",
83                         "Deine Mutter",
84                         "Das war ein BEFEHL!",
85                         "Das bleibt hier alles so wie das hier ist!",
86                         "Scheißße",
87                         "Digga was falsch bei dir",
88                         "Lass mich deine Arschfalten sehen",
89                         "Krieg mal deinen Ödipuskomplex unter Kontrolle",
90                         "Meine Nudel ist 30cm lang und al dente",
91                         "Wie die Nase eines Mannes, so auch sein Johannes.",
92                 }
93
94                 local msg = messages[math.random(#messages)]
95                 local stripe = math.floor(#msg / 3)
96
97                 furrybot.ping_message(name, msg:sub(1, stripe) .. C("red") .. msg:sub(stripe + 1, stripe * 2) .. C("yellow") .. msg:sub(stripe * 2 + 1, #msg), C("black"))
98         end,
99 }
100
101 furrybot.commands.color = {
102         func = function(name)
103                 local color = string.format("#%06x", math.random(16777216) - 1):upper()
104
105                 furrybot.ping_message(name, "Here's your color: " .. C(color) .. color, furrybot.colors.system)
106         end,
107 }
108
109 furrybot.commands.book = {
110         func = function(name)
111                 local books = {
112                         "Johann Wolfgang von Goethe - Faust, Der Tragödie Erster Teil",
113                         "Johann Wolfgang von Goethe - Faust, Der Tragödie Zweiter Teil",
114                         "Karl Marx & Friedrich Engels - The Communist Manifesto",
115                         "Brian Kernhigan & Dennis Ritchie - The C Programming Language",
116                         "Heinrich Heine - Die Harzreise",
117                         "Johann Wolfgang von Goethe - Die Leiden des jungen Werther",
118                         "Friedrich Schiller - Die Jungfrau von Orleans",
119                         "Theodor Fontane - Irrungen, Wirrungen",
120                         "Friedrich Schiller - Die Räuber",
121                         "Theodor Storm - Der Schimmelreiter",
122                         "Josef von Eichendorff - Aus dem Leben eines Taugenichts",
123                         "Richard Esplin - Advanced Linux Programming",
124                         "Joey de Vries - Learn OpenGL",
125                         "Gerard Beekmans - Linux From Scratch",
126                 }
127
128                 furrybot.ping_message(name, books[math.random(#books)], furrybot.colors.system)
129         end,
130 }
131
132 furrybot.commands.video = {
133         func = function(name)
134                 furrybot.ping_message(name, "https://youtube.com/watch?v=dQw4w9WgXcQ", furrybot.colors.system)
135         end,
136 }
137 */