Banhammer-Warn-Text kann jetzt in der Config gesetzt werden
This commit is contained in:
parent
56142c9a11
commit
69787daf92
@ -18,8 +18,15 @@ Dies ist die BETA-Version von Brawlbot v2.
|
||||
|
||||
Sende /hilfe, um zu starten
|
||||
]],
|
||||
-- The symbol that starts a command. Usually noted as '/' in documentation.
|
||||
|
||||
-- DO NOT CHANGE THIS
|
||||
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
|
||||
-- NOTE that it doesn't matter, if the chat is whitelisted! The USER must be whitelisted!
|
||||
|
@ -156,7 +156,10 @@ function banhammer:pre_process(msg, config)
|
||||
end
|
||||
else
|
||||
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)
|
||||
else
|
||||
print('User has already been warned!')
|
||||
|
Reference in New Issue
Block a user