33 lines
700 B
Lua
33 lines
700 B
Lua
|
#Sounds from http://xufox.bplaced.net/GronkhSoundboard/
|
||
|
|
||
|
do
|
||
|
|
||
|
local function run(msg, matches)
|
||
|
local receiver = get_receiver(msg)
|
||
|
local url = "http://code.ponywave.de/workspace/mikubot/gronkhsounds/"..matches[1]..".mp3"
|
||
|
local file = download_to_file(url)
|
||
|
local cb_extra = {file_path=file}
|
||
|
|
||
|
if string.match(msg.text, "[Ll][Ii][Ss][Tt][Ee]") then
|
||
|
return "PonyWave.de/a/gronkhsounds"
|
||
|
end
|
||
|
|
||
|
if not file then
|
||
|
return "Nichts gefunden!"
|
||
|
else
|
||
|
print('Sende Sound')
|
||
|
send_document(receiver, file, rmtmp_cb, cb_extra)
|
||
|
end
|
||
|
|
||
|
end
|
||
|
|
||
|
return {
|
||
|
description = "Gronkh Soundboard",
|
||
|
usage = {"/gronkh [Name]"},
|
||
|
patterns = {
|
||
|
"^/gronkh (.*)$"
|
||
|
},
|
||
|
run = run
|
||
|
}
|
||
|
|
||
|
end
|