diff --git a/API/tools.lua b/API/tools.lua index b48df19..4b68a14 100644 --- a/API/tools.lua +++ b/API/tools.lua @@ -118,6 +118,37 @@ function tools.tableMerge(t1, t2) return t1 end +--Work on this later, simplify fumo command, less hardcoding, please. +function tools.massDetection(folder, filetype) + local command = "find "..folder.." | grep -i "..filetype.." | grep -n "..filetype + local result = io.popen(command) + return(result) +end + +function tools.fumoLines() + os.execute("/bin/bash fumoLines.sh") + local file = io.open("./fumoFile", "r") + local fumoFile = file:read() + file:close() + return(fumoFile) +end + +function tools.fumoList() + local lineList = tools.fumoLines() + local fumoList = {} + os.execute("/bin/bash fumoList.sh") + local file = io.open("./fumoFile", "r") + for i = lineList,1,-1 + do + local number = i + fumoList[number]=file:read() + end + file:close() + print(fumoList[1]) + return(fumoList) +end + + --Message detection logic. If string.find detects both the desired string, and the key, starting at position 1, do the thing. --Now deprecated function tools.messageDectection(message, search) diff --git a/commands/experimentalCommands.lua b/commands/experimentalCommands.lua index f56c75f..405be3e 100644 --- a/commands/experimentalCommands.lua +++ b/commands/experimentalCommands.lua @@ -9,12 +9,14 @@ local commands = { -- Define commands its a table that will contain our commands message.channel:send("Experimental mode works!") end }; ---[[ + [prefix..'fumo'] = { -- To be implemented later.. exec = function (message) + local fumoLines = tools.fumoLines() + local fumoList = tools.fumoList() end }; -]] + } function experimentalCommands.initialize() diff --git a/fumo/fumo-fumofumo.gif b/fumo/fumo-fumofumo.gif new file mode 100644 index 0000000..0f802ed Binary files /dev/null and b/fumo/fumo-fumofumo.gif differ diff --git a/fumo/fumo-shawarma.gif b/fumo/fumo-shawarma.gif new file mode 100644 index 0000000..d2aa96c Binary files /dev/null and b/fumo/fumo-shawarma.gif differ diff --git a/fumo/me-going-to-sleep-knowing-touhou.gif b/fumo/me-going-to-sleep-knowing-touhou.gif new file mode 100644 index 0000000..3f8424a Binary files /dev/null and b/fumo/me-going-to-sleep-knowing-touhou.gif differ diff --git a/fumo/remilia-scarlet.gif b/fumo/remilia-scarlet.gif new file mode 100644 index 0000000..f2b7b5d Binary files /dev/null and b/fumo/remilia-scarlet.gif differ diff --git a/fumo/sakuya-fumo.gif b/fumo/sakuya-fumo.gif new file mode 100644 index 0000000..3b40414 Binary files /dev/null and b/fumo/sakuya-fumo.gif differ diff --git a/fumo/touhou-cirno.gif b/fumo/touhou-cirno.gif new file mode 100644 index 0000000..0a80e73 Binary files /dev/null and b/fumo/touhou-cirno.gif differ diff --git a/fumo/touhou-fumo-touhou.gif b/fumo/touhou-fumo-touhou.gif new file mode 100644 index 0000000..359aab7 Binary files /dev/null and b/fumo/touhou-fumo-touhou.gif differ diff --git a/fumo/touhou-fumo.gif b/fumo/touhou-fumo.gif new file mode 100644 index 0000000..6fa2f55 Binary files /dev/null and b/fumo/touhou-fumo.gif differ diff --git a/fumo/touhou-fumomo.gif b/fumo/touhou-fumomo.gif new file mode 100644 index 0000000..96275b0 Binary files /dev/null and b/fumo/touhou-fumomo.gif differ diff --git a/fumo/touhou-fumomoment.gif b/fumo/touhou-fumomoment.gif new file mode 100644 index 0000000..7670853 Binary files /dev/null and b/fumo/touhou-fumomoment.gif differ diff --git a/fumoCopy.sh b/fumoCopy.sh new file mode 100755 index 0000000..fb49349 --- /dev/null +++ b/fumoCopy.sh @@ -0,0 +1 @@ +echo "$(cp fumo/* /var/www/html/fumo)" \ No newline at end of file diff --git a/fumoLines.sh b/fumoLines.sh new file mode 100755 index 0000000..a70e389 --- /dev/null +++ b/fumoLines.sh @@ -0,0 +1,3 @@ +fumoFileText=$(find fumo | grep -i .gif) +fumoFileNumbers=$(wc -l <<< "$fumoFileText") +echo "$fumoFileNumbers" > "fumoFile" \ No newline at end of file diff --git a/fumoList.sh b/fumoList.sh new file mode 100755 index 0000000..3c47c8e --- /dev/null +++ b/fumoList.sh @@ -0,0 +1,2 @@ +fumoFileText=$(find fumo | grep -i .gif) +echo "$fumoFileText" > "fumoFile" \ No newline at end of file