Added a length fix, and adjusted sleep timer.
This commit is contained in:
parent
ed5297e896
commit
4691c84348
5
main.py
5
main.py
@ -61,7 +61,8 @@ class Ruby(discord.Client):
|
||||
speak = random() < 0.5
|
||||
thought = self.trainer.daydream(say_thought=speak)
|
||||
|
||||
if speak and thought:
|
||||
if speak and thought and
|
||||
len(thought.split()) >=4:
|
||||
for guild in self.guilds:
|
||||
for channel in guild.text_channels:
|
||||
if channel.permissions_for(guild.me).send_messages:
|
||||
@ -72,7 +73,7 @@ class Ruby(discord.Client):
|
||||
await self.set_activity(None) # reset to normal
|
||||
self.last_message_time = datetime.utcnow()
|
||||
|
||||
await asyncio.sleep(30)
|
||||
await asyncio.sleep(180)
|
||||
|
||||
async def on_message(self, message: discord.Message):
|
||||
if message.author.id == self.user.id:
|
||||
|
Loading…
x
Reference in New Issue
Block a user