]> git.lizzy.rs Git - furrybot-discord.git/blob - random.js
Add more commands to the random category
[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         choose: {
11                 func: (msg, options) => msg.reply(options.length < 2 ? "Not enough options" : `I choose ${common.choose(options)}.`)
12         },
13         uwu: {
14                 func: msg => msg.reply(
15                         new Array(1 + Math.floor(Math.random() * 10))
16                         .fill(null)
17                         .map(_ => new Array(3)
18                                 .fill(common.choose(["u", "ü", "o", "ö"])[common.choose(["toUpperCase", "toLowerCase"])]())
19                                 .fill("w"[common.choose(["toUpperCase", "toLowerCase"])](), 1, 2)
20                                 .join("")
21                         )
22                         .join(" ")
23                 )
24         },
25         /*extinct: {
26                 func: (msg, [rawSpecies]) => {
27                         const species = common.uppercase(rawSpecies + (rawSpecies.slice(-1) == "s" ? "" : "s"))
28                         msg.reply(`${species} are ${"extinct"}`)
29                 }
30         }*/
31 }
32 /*
33
34 furrybot.commands.extinct = {
35         func = function(name, species)
36                 if species then
37                         species = furrybot.uppercase(species .. (species:sub(#species, #species):lower() == "s" and "" or "s"))
38                         furrybot.ping_message(name, species  .. " are " .. (furrybot.strrandom(species, 420, 0, 1) == 0 and "not " or "") .. "extinct." , furrybot.colors.system)
39                 else
40                         furrybot.error_message(name, "You need to specify a species")
41                 end
42         end,
43 }
44
45 furrybot.commands.german = {
46         func = function(name)
47                 local messages = {
48                         "Schnauze!",
49                         "Sprich Deutsch, du Hurensohn!",
50                         "NEIN NEIN NEIN NEIN NEIN NEIN",
51                         "Deine Mutter",
52                         "Das war ein BEFEHL!",
53                         "Das bleibt hier alles so wie das hier ist!",
54                         "Scheißße",
55                         "Digga was falsch bei dir",
56                         "Lass mich deine Arschfalten sehen",
57                         "Krieg mal deinen Ödipuskomplex unter Kontrolle",
58                         "Meine Nudel ist 30cm lang und al dente",
59                         "Wie die Nase eines Mannes, so auch sein Johannes.",
60                 }
61
62                 local msg = messages[math.random(#messages)]
63                 local stripe = math.floor(#msg / 3)
64
65                 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"))
66         end,
67 }
68
69 furrybot.commands.color = {
70         func = function(name)
71                 local color = string.format("#%06x", math.random(16777216) - 1):upper()
72
73                 furrybot.ping_message(name, "Here's your color: " .. C(color) .. color, furrybot.colors.system)
74         end,
75 }
76
77 furrybot.commands.book = {
78         func = function(name)
79                 local books = {
80                         "Johann Wolfgang von Goethe - Faust, Der Tragödie Erster Teil",
81                         "Johann Wolfgang von Goethe - Faust, Der Tragödie Zweiter Teil",
82                         "Karl Marx & Friedrich Engels - The Communist Manifesto",
83                         "Brian Kernhigan & Dennis Ritchie - The C Programming Language",
84                         "Heinrich Heine - Die Harzreise",
85                         "Johann Wolfgang von Goethe - Die Leiden des jungen Werther",
86                         "Friedrich Schiller - Die Jungfrau von Orleans",
87                         "Theodor Fontane - Irrungen, Wirrungen",
88                         "Friedrich Schiller - Die Räuber",
89                         "Theodor Storm - Der Schimmelreiter",
90                         "Josef von Eichendorff - Aus dem Leben eines Taugenichts",
91                         "Richard Esplin - Advanced Linux Programming",
92                         "Joey de Vries - Learn OpenGL",
93                         "Gerard Beekmans - Linux From Scratch",
94                 }
95
96                 furrybot.ping_message(name, books[math.random(#books)], furrybot.colors.system)
97         end,
98 }
99
100 furrybot.commands.video = {
101         func = function(name)
102                 furrybot.ping_message(name, "https://youtube.com/watch?v=dQw4w9WgXcQ", furrybot.colors.system)
103         end,
104 }
105 */