Banhammer-Warn-Text kann jetzt in der Config gesetzt werden
This commit is contained in:
parent
56142c9a11
commit
69787daf92
@ -18,9 +18,16 @@ Dies ist die BETA-Version von Brawlbot v2.
|
|||||||
|
|
||||||
Sende /hilfe, um zu starten
|
Sende /hilfe, um zu starten
|
||||||
]],
|
]],
|
||||||
-- The symbol that starts a command. Usually noted as '/' in documentation.
|
|
||||||
|
-- DO NOT CHANGE THIS
|
||||||
cmd_pat = '/',
|
cmd_pat = '/',
|
||||||
|
|
||||||
|
-- Text for users, who are not approved
|
||||||
|
banhammer_text = [[
|
||||||
|
Dies ist ein privater Bot, der erst nach einer Freischaltung benutzt werden kann.
|
||||||
|
This is a private bot, which can only be used after an approval.
|
||||||
|
]],
|
||||||
|
|
||||||
-- false = only whitelisted users can use inline querys
|
-- false = only whitelisted users can use inline querys
|
||||||
-- NOTE that it doesn't matter, if the chat is whitelisted! The USER must be whitelisted!
|
-- NOTE that it doesn't matter, if the chat is whitelisted! The USER must be whitelisted!
|
||||||
enable_inline_for_everyone = true,
|
enable_inline_for_everyone = true,
|
||||||
|
@ -156,7 +156,10 @@ function banhammer:pre_process(msg, config)
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
if not has_been_warned then
|
if not has_been_warned then
|
||||||
utilities.send_reply(msg, "Dies ist ein privater Bot, der erst nach einer Freischaltung benutzt werden kann.\nThis is a private bot, which can only be after an approval.")
|
utilities.send_reply(msg, config.banhammer_text or [[
|
||||||
|
Dies ist ein privater Bot, der erst nach einer Freischaltung benutzt werden kann.
|
||||||
|
This is a private bot, which can only be used after an approval.
|
||||||
|
]])
|
||||||
redis:hset('user:'..user_id, 'has_been_warned', true)
|
redis:hset('user:'..user_id, 'has_been_warned', true)
|
||||||
else
|
else
|
||||||
print('User has already been warned!')
|
print('User has already been warned!')
|
||||||
|
Reference in New Issue
Block a user