mirror of
https://github.com/house-of-vanity/conf_bot.git
synced 2025-07-06 22:34:07 +00:00
Allow speaking in only one chat
This commit is contained in:
@ -100,6 +100,7 @@ class MessageWorker:
|
||||
'@' + self.me['result']['username'], '')
|
||||
except:
|
||||
input_message = msg['message']['text']
|
||||
if str(msg['message']['chat']['id']) == "-1001233797421":
|
||||
if random.randint(0,300) == 1:
|
||||
conf_id = msg['message']['chat']['id']
|
||||
user_id = msg['message']['from']['id']
|
||||
@ -119,7 +120,7 @@ class MessageWorker:
|
||||
if random.randint(0,100) > 80:
|
||||
msg = answers[random.randint(0,len(answers)-1)]
|
||||
self.send(id=conf_id, msg=msg)
|
||||
if (input_message[0] == 'Ты') or (input_message[0] == 'ты'):
|
||||
if (input_message[0:1] == 'Ты') or (input_message[0:1] == 'ты'):
|
||||
if len(input_message) > 5:
|
||||
conf_id = msg['message']['chat']['id']
|
||||
user_id = msg['message']['from']['id']
|
||||
|
Reference in New Issue
Block a user