Catch none type sentences
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-04-03 10:55:20 +03:00
parent 7a1132445f
commit 00b1287ef3
3 changed files with 6 additions and 3 deletions

1
.gitignore vendored
View File

@@ -4,3 +4,4 @@ venv
.env .env
/data/* /data/*
*.session *.session
*.session-journal

View File

@@ -8,8 +8,7 @@ api_id = os.getenv('API_ID')
api_hash = os.getenv('API_HASH') api_hash = os.getenv('API_HASH')
chats = [ chats = [
'tg1337const', 'tg1337const',
'cyberboec', 'cyberboec'
'Ateobreaking'
] ]
def cleanup(msg): def cleanup(msg):

View File

@@ -22,7 +22,10 @@ text_model = markovify.Text(text)
message = '' message = ''
for i in range(5): for i in range(5):
message = message + text_model.make_sentence() try:
message = message + text_model.make_sentence()
except:
pass
if (dry_run): if (dry_run):
print(message) print(message)