do

local function run(msg, matches)
  local receiver = get_receiver(msg)
  --local url = "http://code.ponywave.de/workspace/mikubot/sounds/"..matches[1]..".mp3"
  local url = "http://kyouko.local/sounds/"..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 "Hier eine Liste aller Sounds: PonyWave.de/a/sounds"
  
  elseif string.match(msg.text, "[Rr][Aa][Nn][Dd][Oo][Mm]") then
  return "Kommt noch!"
  
  end
  
  if not file then
  return "Nichts gefunden!\nSicher, dass "..matches[1].." existiert?"
  else
    print('Sende Sound')
        send_audio(receiver, file, rmtmp_cb, cb_extra)
  end
  
end

return {
    description = "Soundboard", 
    usage = {"#sound [Sound]: Sendet ein Sound",
                 "#sound liste: Zeigt alle verfügbare Sounds",
                 "#sound random: Sendet ein zufälligen Sound (Kommt noch)"},
    patterns = {
    	"^#[Ss][Oo][Uu][Nn][Dd] (.*)$"
    }, 
    run = run 
}

end
--by Akamaru [https://ponywave.de]