Compare commits

...

2 Commits

@ -1,10 +1,15 @@
#!/usr/bin/env ruby
# ./Emery.rb
# pkill Emery
require 'discordrb'
require 'tmpdir'
puts "---\nEmery PID is #{Process.pid}\nTo kill Emery simply {kill #{Process.pid}}\n---"
def emery_loadModules()
$commands = {}
puts '---'
# Yes this gets redefined. Why? Because I like having all my variables in one place but it also needs to be cleared again
File.foreach("modules/modules.txt", chop: true) { |line|
# For every line in the file, do below
@ -21,6 +26,7 @@ def emery_loadModules()
end
end
}
puts '---'
end
token = File.read("token.txt")

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1010 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

@ -0,0 +1,20 @@
def fumo_main(event)
fumoFolder = "./modules/fumo/fumoPics"
if directory_exists?(fumoFolder)
fumoArray = Dir.entries(fumoFolder).select { |f| File.file? File.join(fumoFolder, f) }
x = fumoArray.length
rng = rand x
fumoFile = "#{fumoFolder}/#{fumoArray[rng]}"
$bot.send_file(event.message.channel, File.open(fumoFile, 'r'))
else
event.respond "No fumo folder found. Please fix that."
end
end
def fumo_getCommand()
return ["fumo", "fumo_main"]
end
def directory_exists?(directory)
File.directory?(directory)
end

@ -5,4 +5,5 @@ reload
skipMusic
stopMusic
volumeMusic
listQueue
listQueue
fumo
Loading…
Cancel
Save