From 952372b8189d24624028c226b74853bc2e7e1949 Mon Sep 17 00:00:00 2001 From: Akamaru Date: Fri, 13 Nov 2015 13:51:56 +0100 Subject: [PATCH] =?UTF-8?q?Soundboard=20und=20Gronkh=20Soundboard=20=C3=BC?= =?UTF-8?q?berarbeitet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Hilfe hinzugefügt • Fehlermeldung bei nicht vorhandenen Sound wurde überarbeitet • Vorbereitung für random Sounds --- plugins/gronkh_soundboard.lua | 21 ++++++++++++++------- plugins/soundboard.lua | 19 +++++++++++++------ 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/plugins/gronkh_soundboard.lua b/plugins/gronkh_soundboard.lua index e2d00bc..054056f 100644 --- a/plugins/gronkh_soundboard.lua +++ b/plugins/gronkh_soundboard.lua @@ -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 \ No newline at end of file +end +--by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/soundboard.lua b/plugins/soundboard.lua index a8b8744..f08c065 100644 --- a/plugins/soundboard.lua +++ b/plugins/soundboard.lua @@ -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 \ No newline at end of file +end +--by Akamaru [https://ponywave.de] \ No newline at end of file