Pattern Fixes bei einigen Plugins

This commit is contained in:
Akamaru 2016-07-07 21:34:32 +02:00
parent d612fade97
commit 8fdc1b9ec0
17 changed files with 158 additions and 90 deletions

View File

@ -28,7 +28,7 @@ return {
description = "Sendet ein zufälliges Bild von 9GAG", description = "Sendet ein zufälliges Bild von 9GAG",
usage = "#9gag: Sendet ein zufälliges Bild von 9GAG.", usage = "#9gag: Sendet ein zufälliges Bild von 9GAG.",
patterns = { patterns = {
"^#9gag$" "^#9[Gg][Aa][Gg]$"
}, },
run = run run = run
} }

View File

@ -13,7 +13,6 @@ local function get_stock (symbol)
end end
function send_stock_data(data, receiver) function send_stock_data(data, receiver)
-- local ask = data.Ask
local bid = data.Bid local bid = data.Bid
local change = data.Change local change = data.Change
local percent = data.ChangeinPercent local percent = data.ChangeinPercent
@ -41,12 +40,10 @@ end
return { return {
description = "Sendet Aktieninfos", description = "Sendet Aktieninfos",
usage = "#aktien [Symbol]: Sendet Aktieninfos", usage = "#aktien [Symbol]: Sendet Aktieninfos", "#stocks [Symbol]",
patterns = { patterns = {
"^#aktien ([A-Za-z0-9]+)$", "^#[Aa][Kk][Tt][Ii][Ee][Nn]? ([A-Za-z0-9]+)$",
"^#stocks ([A-Za-z0-9]+)$", "^#[Ss][Tt][Oo][Cc][Kk][Ss]? ([A-Za-z0-9]+)$"
"^#aktie ([A-Za-z0-9]+)$",
"^#stock ([A-Za-z0-9]+)$"
}, },
run = run run = run
} }

View File

@ -1,18 +1,22 @@
do
function run(msg, matches) function run(msg, matches)
local user_name = get_name(msg) local user_name = get_name(msg)
local answers = {'Ja?','Was gibts, ' .. user_name .. '?','Ja ' .. user_name .. ', was ist?', local answers = {'Ja?','Was gibts, ' .. user_name .. '?','Ja ' .. user_name .. ', was ist?',
'Ich bin noch da.', user_name ,'Nein!','So heiße ich'} 'Ich bin noch da.', user_name ,'Nein!','So heiße ich', 'Nerv mich nicht!'}
return answers[math.random(#answers)] return answers[math.random(#answers)]
end end
return { return {
description = "Ist der Bot noch da?", description = "Ist der Bot noch da?",
usage = {"Miku"}, usage = {"Miku", "ミク"},
patterns = {"^[Mm][Ii][Kk][Uu](?)$", patterns = {"^[Mm][Ii][Kk][Uu]%??$",
"^[Mm][Ii][Kk][Uu]$", "^ミク%??$"
"^ミク$",
"^ミク(?)$"
}, },
run = run run = run
} }
--by Akamaru [https://ponywave.de]
--by Akamaru [https://ponywave.de]
end

View File

@ -100,7 +100,7 @@ local function run(msg, matches)
appid = matches[3] appid = matches[3]
end end
local data = get_appstore_data() local data = get_appstore_data()
if data == nil then print('Das Appstore-Plugin unterstützt zurzeit nur Apps!') end if data == nil then print('Das AppStore-Plugin unterstützt derzeit nur Apps!') end
if data == 'HTTP-FEHLER' or data == 'NOTFOUND' then if data == 'HTTP-FEHLER' or data == 'NOTFOUND' then
return 'App nicht gefunden!' return 'App nicht gefunden!'
else else
@ -109,12 +109,12 @@ local function run(msg, matches)
end end
return { return {
description = "Sendet iPhone App-Store Info.", description = "Sendet iOS AppStore Info.",
usage = {"Link zu App auf iTunes", usage = {"Link zu App auf iTunes",
"#itunes (ID)" "#itunes (ID)"
}, },
patterns = {"itunes.apple.com/(.*)/app/(.*)/id(%d+)", patterns = {"itunes.apple.com/(.*)/app/(.*)/id(%d+)",
"^#itunes (%d+)$" "^#[Ii][Tt][Uu][Nn][Ee][Ss] (%d+)$"
}, },
run = run run = run
} }

View File

@ -1,9 +1,11 @@
do
local function get_value(msg, var_name) local function get_value(msg, var_name)
local hash = 'telegram:birthdays' local hash = 'telegram:birthdays'
if hash then if hash then
local value = redis:hget(hash, var_name) local value = redis:hget(hash, var_name)
if not value then if not value then
return'Geburtstag nicht gefunden, benutze "/getbd", um alle Geburtstage aufzulisten.' return'Geburtstag nicht gefunden, benutze "#getbd", um alle Geburtstage aufzulisten.'
else else
return var_name..' hat am '..value..' Geburtstag' return var_name..' hat am '..value..' Geburtstag'
end end
@ -14,7 +16,7 @@ local function list_variables(msg)
local hash = 'telegram:birthdays' local hash = 'telegram:birthdays'
if hash then if hash then
print('Getting variable from redis hash '..hash) print('Suche nach Geburtstag in '..hash)
local names = redis:hkeys(hash) local names = redis:hkeys(hash)
local text = '' local text = ''
for i=1, #names do for i=1, #names do
@ -38,14 +40,18 @@ local function run(msg, matches)
end end
return { return {
description = "Zeigt Geburtstage, die mit /setbd gesetzt wurden", description = "Zeigt Geburtstage, die mit #setbd gesetzt wurden",
usage = { usage = {
"#getbd: Gibt alle Geburtstage aus", "#getbd: Gibt alle Geburtstage aus",
"#getbd (Name): Gibt den Geburtstag aus." "#getbd (Name): Gibt ein spezifischen Geburtstag aus."
}, },
patterns = { patterns = {
"^(#getbd) (.+)$", "^(#[Gg][Ee][Tt][Bb][Dd]) (.+)$",
"^#getbd$" "^#[Gg][Ee][Tt][Bb][Dd]$"
}, },
run = run run = run
} }
--by Akamaru [https://ponywave.de]
end

View File

@ -1,3 +1,5 @@
do
local function save_value(msg, name, value) local function save_value(msg, name, value)
if (not name or not value) then if (not name or not value) then
return "Benutzung: #setbd [Name] [Tag. Monat]" return "Benutzung: #setbd [Name] [Tag. Monat]"
@ -5,7 +7,7 @@ local function save_value(msg, name, value)
local hash = 'telegram:birthdays' local hash = 'telegram:birthdays'
if hash then if hash then
print('Saving variable to redis hash '..hash) print('Speicher Geburtstag in '..hash)
redis:hset(hash, name, value) redis:hset(hash, name, value)
return "Geburtstag von "..name.." am "..value.." gespeichert!" return "Geburtstag von "..name.." am "..value.." gespeichert!"
end end
@ -14,11 +16,11 @@ end
local function delete_value(msg, name) local function delete_value(msg, name)
local hash = 'telegram:birthdays' local hash = 'telegram:birthdays'
if redis:hexists(hash, name) == true then if redis:hexists(hash, name) == true then
print('Deleting birthday from redis hash '..hash) print('Lösche Geburtstag aus '..hash)
redis:hdel(hash, name) redis:hdel(hash, name)
return 'Geburtstag von "'..name..'" erfolgreich gelöscht!' return 'Geburtstag von "'..name..'" erfolgreich gelöscht!'
else else
return 'Du kannst keinen Geburtstag löschen, der nicht existiert ._.' return 'Du kannst keinen Geburtstag löschen, der nicht existiert.'
end end
end end
@ -41,7 +43,11 @@ return {
"#setbd (Name) nil: Löscht Geburtstag" "#setbd (Name) nil: Löscht Geburtstag"
}, },
patterns = { patterns = {
"^#setbd ([^%s]+) (.+)$" "^#[Ss][Ee][Tt][Bb][Dd] ([^%s]+) (.+)$"
}, },
run = run run = run
} }
--by Akamaru [https://ponywave.de]
end

View File

@ -27,15 +27,16 @@ end
return { return {
description = "Kürzt einen Link", description = "Kürzt einen Link",
usage = { usage = {
"/short [Link]: Kürzt einen Link mit Bitly", "#short [Link]: Kürzt einen Link mit Bitly",
"/short [j.mp|bit.ly|bitly.com|andib.tk] [Link]: Kürzt einen Link mit der ausgewählten Kurz-URL" "#
short [j.mp|bit.ly|bitly.com|andib.tk] [Link]: Kürzt einen Link mit der ausgewählten Kurz-URL"
}, },
patterns = { patterns = {
"^/short (j.mp) (https?://[%w-_%.%?%.:/%+=&]+)$", "^#[Ss][Hh][Oo][Rr][Tt] (j.mp) (https?://[%w-_%.%?%.:/%+=&]+)$",
"^/short (bit.ly) (https?://[%w-_%.%?%.:/%+=&]+)$", "^#[Ss][Hh][Oo][Rr][Tt] (bit.ly) (https?://[%w-_%.%?%.:/%+=&]+)$",
"^/short (bitly.com) (https?://[%w-_%.%?%.:/%+=&]+)$", "^#[Ss][Hh][Oo][Rr][Tt] (bitly.com) (https?://[%w-_%.%?%.:/%+=&]+)$",
"^/short (andib.tk) (https?://[%w-_%.%?%.:/%+=&]+)$", "^#[Ss][Hh][Oo][Rr][Tt] (andib.tk) (https?://[%w-_%.%?%.:/%+=&]+)$",
"^/short (https?://[%w-_%.%?%.:/%+=&]+)$" "^#[Ss][Hh][Oo][Rr][Tt] (https?://[%w-_%.%?%.:/%+=&]+)$"
}, },
run = run run = run
} }

View File

@ -40,11 +40,11 @@ end
local function run(msg, matches) local function run(msg, matches)
local url = nil local url = nil
if matches[1] == "#boobs" then if matches[1] == "#[Bb][Oo][Oo][Bb][Ss]" then
url = getRandomBoobs() url = getRandomBoobs()
end end
if matches[1] == "#butts" then if matches[1] == "#[Bb][Uu][Tt][Tt][Ss]" then
url = getRandomButts() url = getRandomButts()
end end
@ -60,8 +60,8 @@ end
return { return {
description = "Sendet ein zufälliges Boobs/Butts Bild", description = "Sendet ein zufälliges Boobs/Butts Bild",
usage = {"#boobs","#butts"}, usage = {"#boobs","#butts"},
patterns = {"^#boobs$","^#butts$"}, patterns = {"^#[Bb][Oo][Oo][Bb][Ss]$","^#[Bb][Uu][Tt][Tt][Ss]$"},
run = run run = run
} }
end end

View File

@ -1,3 +1,5 @@
do
-- See https://bitcoinaverage.com/api -- See https://bitcoinaverage.com/api
local function getBTCX(amount,currency) local function getBTCX(amount,currency)
local base_url = 'https://api.bitcoinaverage.com/ticker/global/' local base_url = 'https://api.bitcoinaverage.com/ticker/global/'
@ -25,7 +27,7 @@ local function run(msg, matches)
local amt = nil local amt = nil
-- Get the global match out of the way -- Get the global match out of the way
if matches[1] == "#btc" then if matches[1] == "#[Bb][Tt][Cc]" then
return getBTCX(amt,cur) return getBTCX(amt,cur)
end end
@ -47,11 +49,13 @@ return {
"#btc [EUR|USD] [Menge]: Rechnet Bitcoin in Euro/USD um" "#btc [EUR|USD] [Menge]: Rechnet Bitcoin in Euro/USD um"
}, },
patterns = { patterns = {
"^#btc$", "^#[Bb][Tt][Cc]$",
"^#btc ([Ee][Uu][Rr])$", "^#[Bb][Tt][Cc] ([Ee][Uu][Rr])$",
"^#btc ([Uu][Ss][Dd])$", "^#[Bb][Tt][Cc] ([Uu][Ss][Dd])$",
"^#btc (EUR) (%d+[%d%.]*)$", "^#[Bb][Tt][Cc] ([Ee][Uu][Rr]) (%d+[%d%.]*)$",
"^#btc (USD) (%d+[%d%.]*)$" "^#[Bb][Tt][Cc] ([Uu][Ss][Dd]) (%d+[%d%.]*)$"
}, },
run = run run = run
} }
end

View File

@ -1,3 +1,5 @@
do
-- Checks if bot was disabled on specific chat -- Checks if bot was disabled on specific chat
local function is_channel_disabled(msg) local function is_channel_disabled(msg)
local hash = 'chat:'..msg.to.id..':disabled' local hash = 'chat:'..msg.to.id..':disabled'
@ -16,7 +18,7 @@ local function enable_channel(msg)
if disabled then if disabled then
print('Setze Redis Variable "'..hash..'" auf false') print('Setze Redis Variable "'..hash..'" auf false')
redis:set(hash, false) redis:set(hash, false)
return 'Channel aktiviert' return 'Channel aktiviert!'
else else
return 'Channel ist nicht deaktiviert!' return 'Channel ist nicht deaktiviert!'
end end
@ -28,7 +30,7 @@ local function disable_channel(msg)
if disabled ~= "true" then if disabled ~= "true" then
print('Setze Redis Variable "'..hash..'" auf true') print('Setze Redis Variable "'..hash..'" auf true')
redis:set(hash, true) redis:set(hash, true)
return 'Channel deaktiviert' return 'Channel deaktiviert!'
else else
return 'Channel ist bereits deaktiviert!' return 'Channel ist bereits deaktiviert!'
end end
@ -38,7 +40,7 @@ local function pre_process(msg)
-- If is sudo can reeanble the channel -- If is sudo can reeanble the channel
if is_sudo(msg) then if is_sudo(msg) then
if msg.text == "#channel enable" then if msg.text == "#[Cc][Hh][Aa][Nn][Nn][Ee][Ll] [Ee][Nn][Aa][Bb][Ll][Ee]" then
enable_channel(msg) enable_channel(msg)
end end
end end
@ -53,11 +55,11 @@ end
local function run(msg, matches) local function run(msg, matches)
-- Enable a channel -- Enable a channel
if matches[1] == 'enable' then if matches[1] == '[Ee][Nn][Aa][Bb][Ll][Ee]' then
return enable_channel(msg) return enable_channel(msg)
end end
-- Disable a channel -- Disable a channel
if matches[1] == 'disable' then if matches[1] == '[Dd][Ii][Ss][Aa][Bb][Ll][Ee]' then
return disable_channel(msg) return disable_channel(msg)
end end
end end
@ -69,8 +71,8 @@ return {
"#channel disable: Deaktiviert den Bot im Chat" "#channel disable: Deaktiviert den Bot im Chat"
}, },
patterns = { patterns = {
"^#channel? (enable)", "^#[Cc][Hh][Aa][Nn][Nn][Ee][Ll] ([Ee][Nn][Aa][Bb][Ll][Ee])",
"^#channel? (disable)" "^#[Cc][Hh][Aa][Nn][Nn][Ee][Ll] ([Dd][Ii][Ss][Aa][Bb][Ll][Ee])"
}, },
run = run, run = run,
privileged = true, privileged = true,

View File

@ -1,3 +1,5 @@
do
local function chuck() local function chuck()
local random = http.request("http://api.icndb.com/jokes/random") local random = http.request("http://api.icndb.com/jokes/random")
local decode = json:decode(random) local decode = json:decode(random)
@ -13,6 +15,8 @@ end
return { return {
description = "Sendet Chuck Norris Witze (Englisch)", description = "Sendet Chuck Norris Witze (Englisch)",
usage = {"#cn"}, usage = {"#cn"},
patterns = {"^#cn$"}, patterns = {"^#[Cc][Nn]$"},
run = run run = run
} }
end

View File

@ -2,7 +2,7 @@ do
function run(msg, matches) function run(msg, matches)
local text = msg.text local text = msg.text
local url = "https://andibi.tk/dl/chatter-bot-api/cleverbot.php?text="..URL.escape(text) local url = "https://brawlbot.tk/apis/chatter-bot-api/cleverbot.php?text="..URL.escape(text)
local query = https.request(url) local query = https.request(url)
if query == nil then return 'Ein Fehler ist aufgetreten :(' end if query == nil then return 'Ein Fehler ist aufgetreten :(' end
local decode = json:decode(query) local decode = json:decode(query)
@ -20,7 +20,9 @@ end
return { return {
description = "Chat mit CleverBot", description = "Chat mit CleverBot",
usage = "#cbot [Text]: Befragt den Cleverbot", usage = "#cbot [Text]: Befragt den Cleverbot",
patterns = {"^#cbot (.*)$"}, patterns = {
"^#[Cc][Bb][Oo][Tt] (.*)$"
},
run = run run = run
} }

View File

@ -1,8 +1,10 @@
do
function run(msg, matches) function run(msg, matches)
cow = matches[1] local cow = matches[1]
local receiver = get_receiver(msg) local receiver = get_receiver(msg)
if string.match(msg.text, '"') then if string.match(cow, '"') then
return 'Vergiss es' return 'Vergiss es!'
else else
local text = run_bash('cowsay "' .. cow .. '"') local text = run_bash('cowsay "' .. cow .. '"')
send_msg(receiver, text, ok_cb, false) send_msg(receiver, text, ok_cb, false)
@ -10,9 +12,11 @@ function run(msg, matches)
end end
return { return {
description = "", description = "Die sprechende Kuh!",
usage = {""}, usage = {"#cowsay [Text]"},
patterns = {"^#cowsay (.*)$"}, patterns = {"^#[Cc][Oo][Ww][Ss][Aa][Yy] (.*)$"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]
end

View File

@ -1,3 +1,5 @@
do
-- This file is part of the Telegram Bot "Brawlbot" (telegram.me/Brawlbot) by Andreas Bielawski (telegram.me/Brawl) -- This file is part of the Telegram Bot "Brawlbot" (telegram.me/Brawlbot) by Andreas Bielawski (telegram.me/Brawl)
-- Released unter the MPLv2 -- Released unter the MPLv2
@ -107,12 +109,14 @@ return {
"#creds rename [Variable] [Neuer Name]: Benennt Variable um, behält Key bei" "#creds rename [Variable] [Neuer Name]: Benennt Variable um, behält Key bei"
}, },
patterns = { patterns = {
"^(/creds)$", "^(#creds)$",
"^(/creds add) ([^%s]+) (.+)$", "^(#creds add) ([^%s]+) (.+)$",
"^(/creds del) (.+)$", "^(#creds del) (.+)$",
"^(/creds rename) ([^%s]+) (.+)$" "^(#creds rename) ([^%s]+) (.+)$"
}, },
run = run, run = run,
privileged = true, privileged = true,
notyping = true notyping = true
} }
end

View File

@ -7,11 +7,25 @@ function run(msg, matches)
user_name..' versucht, '..other_user..' mit einem Messer zu töten, stolpert aber und schlitzt sich dabei das Knie auf.', user_name..' versucht, '..other_user..' mit einem Messer zu töten, stolpert aber und schlitzt sich dabei das Knie auf.',
user_name..' ersticht '..other_user..'.', user_name..' ersticht '..other_user..'.',
user_name..' tritt '..other_user..'.', user_name..' tritt '..other_user..'.',
user_name..' hat '..other_user..' umgebracht! Möge er in der Hölle schmoren!', user_name..' hat '..other_user..' umgebracht! Möge '..user_name..' in der Hölle schmoren!',
user_name..' hat die Schnauze voll von '..other_user..' und sperrt ihn in einen Schrank.', user_name..' hat die Schnauze voll von '..other_user..' und sperrt '..other_user..' in einen Schrank.',
user_name..' erwürgt '..other_user..'. BILD sprach als erstes mit der Hand.', user_name..' erwürgt '..other_user..'. BILD sprach als erstes mit der Hand.',
user_name..' schickt '..other_user..' nach /dev/null.', user_name..' schickt '..other_user..' nach /dev/null.',
user_name..' umarmt '..other_user..'.', user_name..' wirft einen Gameboy auf '..other_user..'.',
user_name..' hetzt die NSA auf '..other_user..'.',
user_name..' ersetzt alle CDs von '..other_user..' durch Justin Bieber CDs.',
user_name..' geht mit '..other_user..' zurück in die Zukunft.',
user_name..' geht mit '..other_user..' Gassi.',
user_name..' verkleidet '..other_user..' als Flamingo.',
user_name..' steckt '..other_user..' den Finger in den Po.',
user_name..' schickt '..other_user..' ins Dschungelcamp.',
user_name..' küsst '..other_user..' den Hintern.',
user_name..' küsst '..other_user..' leidenschaftlich.',
user_name..' erwischt '..other_user..' beim Masturbieren.',
user_name..' furzt '..other_user..' ins Gesicht.',
user_name..' schubst '..other_user..' von einer Brücke.',
user_name..' kackt '..other_user..' auf die Stulle.',
user_name..' umarmt '..other_user..'.',
user_name..' verschenkt eine Kartoffel an '..other_user..'.', user_name..' verschenkt eine Kartoffel an '..other_user..'.',
user_name..' ist in '..other_user..' verliebt.', user_name..' ist in '..other_user..' verliebt.',
user_name..' schmeißt '..other_user..' in einen Fluss.', user_name..' schmeißt '..other_user..' in einen Fluss.',
@ -21,7 +35,16 @@ function run(msg, matches)
user_name..' dreht durch und wirft '..other_user..' in einen Häcksler.', user_name..' dreht durch und wirft '..other_user..' in einen Häcksler.',
user_name..' gibt '..other_user..' einen Cookie.', user_name..' gibt '..other_user..' einen Cookie.',
user_name..' lacht '..other_user..' aus.', user_name..' lacht '..other_user..' aus.',
user_name..' gibt '..other_user..[[ ganz viel Liebe. ( ͡° ͜ʖ ͡°)]] } user_name..' gibt '..other_user..[[ ganz viel Liebe. ( ͡° ͜ʖ ͡°)]],
user_name..' lädt '..other_user..' zum Essen ein.',
user_name..' schwätzt '..other_user..' Ubuntu auf.',
user_name..' fliegt mit '..other_user..' nach Hawaii.',
user_name..' melkt '..other_user..'. *muhh*',
user_name..' schaut zusammen mit '..other_user..' My Little Pony.',
user_name..' schickt '..other_user..' nach Bikini Bottom.',
user_name..' beamt '..other_user..' hoch.',
user_name..' und '..other_user..' sind taube Nüsschen. Yeah!',
user_name..' schmiert Hundescheiße auf '..other_user..'s Nike Air.' }
return random[math.random(#random)] return random[math.random(#random)]
end end

View File

@ -1,16 +1,24 @@
do
local function transeng(ger) local function transeng(ger)
ger = string.gsub(ger, 'week,', 'Woche') ger = string.gsub(ger, 'week,', 'Woche,')
ger = string.gsub(ger, 'weeks,', 'Wochen') ger = string.gsub(ger, 'weeks,', 'Wochen,')
ger = string.gsub(ger, 'day,', 'Tag') ger = string.gsub(ger, 'day,', 'Tag,')
ger = string.gsub(ger, 'days,', 'Tage') ger = string.gsub(ger, 'days,', 'Tage,')
ger = string.gsub(ger, 'hour,', 'Stunde') ger = string.gsub(ger, 'hour,', 'Stunde und')
ger = string.gsub(ger, 'hours,', 'Stunden') ger = string.gsub(ger, 'hours,', 'Stunden und')
ger = string.gsub(ger, 'minute$', 'Minute') ger = string.gsub(ger, 'minute$', 'Minute.')
ger = string.gsub(ger, 'minutes', 'Minuten') ger = string.gsub(ger, 'minutes', 'Minuten.')
return ger return ger
end end
local makeOurDate = function(dateString)
local pattern = "(%d+)%-(%d+)%-(%d+)"
local year, month, day = dateString:match(pattern)
return day..'.'..month..'.'..year
end
local function run(msg, matches) local function run(msg, matches)
local receiver = get_receiver(msg) local receiver = get_receiver(msg)
@ -21,9 +29,10 @@ local function run(msg, matches)
end end
if string.match(msg.text, '^#[Uu][Pp][Tt][Ii][Mm][Ee]$') then if string.match(msg.text, '^#[Uu][Pp][Tt][Ii][Mm][Ee]$') then
cmd = run_bash('uptime -p') cmd = run_bash('uptime -s && uptime -p')
text = transeng('Der PC ist seit '..string.match(cmd, 'up (.*)')..' an') text1 = 'Der PC ist seit dem '..makeOurDate(string.match(cmd, '(%d+-%d+-%d+)'))..' an.'
return text text2 = transeng('Das sind '..string.match(cmd, 'up (.*)'))
return text1..'\n'..text2
end end
-- Requires scrot (sudo apt-get install scrot) -- Requires scrot (sudo apt-get install scrot)
@ -49,13 +58,15 @@ end
return { return {
description = "Führt Befehle in der Konsole aus", description = "Führt Befehle in der Konsole aus",
usage = {"#sh [Befehl]","#uptime","#temp","#volt","#takt","#screen","#update","#upgrade"}, usage = {"#sh [Befehl]","#uptime","#screen","#check","#webcam"},
patterns = {"^#[Ss][Hh] (.*)$", patterns = {"^#[Ss][Hh] (.*)$",
"^#[Uu][Pp][Tt][Ii][Mm][Ee]$", "^#[Uu][Pp][Tt][Ii][Mm][Ee]$",
"^#[Ss][Cc][Rr][Ee][Ee][Nn]$", "^#[Ss][Cc][Rr][Ee][Ee][Nn]$",
"^#[Cc][Hh][Ee][Cc][Kk]$", "^#[Cc][Hh][Ee][Cc][Kk]$",
"^#[Ww][Ee][Bb][Cc][Aa][Mm]$" "^#[Ww][Ee][Bb][Cc][Aa][Mm]$"
}, },
run = run, run = run,
privileged = true privileged = true
} }
end

View File

@ -82,7 +82,7 @@ end
local function run(msg, matches) local function run(msg, matches)
local user_id = msg.from.id local user_id = msg.from.id
if matches[1] ~= '/wetter' and matches[1] ~= '/w' then if matches[1] ~= '#wetter' and matches[1] ~= '#w' then
city = matches[1] city = matches[1]
else else
local set_location = get_location(user_id) local set_location = get_location(user_id)
@ -117,7 +117,7 @@ end
return { return {
description = "Wetter für deinen oder einen gewählten Ort", description = "Wetter für deinen oder einen gewählten Ort",
usage = { usage = {
"#wetter: Wetter für deinen Wohnort (!location set [Ort])", "#wetter: Wetter für deinen Wohnort (#location set [Ort])",
"#wetter (Stadt): Wetter für diese Stadt" "#wetter (Stadt): Wetter für diese Stadt"
}, },
patterns = { patterns = {