Catch none type sentences
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@ venv
|
|||||||
.env
|
.env
|
||||||
/data/*
|
/data/*
|
||||||
*.session
|
*.session
|
||||||
|
*.session-journal
|
||||||
|
|||||||
@@ -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):
|
||||||
|
|||||||
3
main.py
3
main.py
@@ -22,7 +22,10 @@ text_model = markovify.Text(text)
|
|||||||
message = ''
|
message = ''
|
||||||
|
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
|
try:
|
||||||
message = message + text_model.make_sentence()
|
message = message + text_model.make_sentence()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
if (dry_run):
|
if (dry_run):
|
||||||
print(message)
|
print(message)
|
||||||
|
|||||||
Reference in New Issue
Block a user