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