Soundboard und Gronkh Soundboard überarbeitet

• Hilfe hinzugefügt
• Fehlermeldung bei nicht vorhandenen Sound wurde überarbeitet
• Vorbereitung für random Sounds
This commit is contained in:
Akamaru 2015-11-13 13:51:56 +01:00
parent 0d6459c084
commit 952372b818
2 changed files with 27 additions and 13 deletions

View File

@ -1,4 +1,4 @@
#Sounds from http://xufox.bplaced.net/GronkhSoundboard/
--Sounds from http://xufox.bplaced.net/GronkhSoundboard/
do
@ -9,11 +9,15 @@ local function run(msg, matches)
local cb_extra = {file_path=file}
if string.match(msg.text, "[Ll][Ii][Ss][Tt][Ee]") then
return "PonyWave.de/a/gronkhsounds"
return "Hier eine Liste aller Sounds: PonyWave.de/a/gronkhsounds"
elseif string.match(msg.text, "[Rr][Aa][Nn][Dd][Oo][Mm]") then
return "Kommt noch!"
end
if not file then
return "Nichts gefunden!"
if not file then
return "Nichts gefunden!\nSicher, dass "..matches[1].." existiert?"
else
print('Sende Sound')
send_document(receiver, file, rmtmp_cb, cb_extra)
@ -23,11 +27,14 @@ end
return {
description = "Gronkh Soundboard",
usage = {"/gronkh [Name]"},
usage = {"/gronkh [Sound]: Sendet ein Sound",
"/gronkh liste: Zeigt alle verfügbare Sounds",
"/gronkh random: Sendet ein zufälligen Sound (Kommt noch)"},
patterns = {
"^/gronkh (.*)$"
"^/[Gg][Rr][Oo][Nn][Kk][Hh] (.*)$"
},
run = run
}
end
end
--by Akamaru [https://ponywave.de]

View File

@ -7,11 +7,15 @@ local function run(msg, matches)
local cb_extra = {file_path=file}
if string.match(msg.text, "[Ll][Ii][Ss][Tt][Ee]") then
return 'Eine Liste aller Sounds findet ihr hier: https://ponywave.de/a/sounds'
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!"
return "Nichts gefunden!\nSicher, dass "..matches[1].." existiert?"
else
print('Sende Datei')
send_document(receiver, file, rmtmp_cb, cb_extra)
@ -20,12 +24,15 @@ local function run(msg, matches)
end
return {
description = "Sound Bar",
usage = {"/sound [Name]"},
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 = {
"^/sound (.*)$"
"^/[Ss][Oo][Uu][Nn][Dd] (.*)$"
},
run = run
}
end
end
--by Akamaru [https://ponywave.de]