Commit 57a864a9 authored by NanoDano's avatar NanoDano Committed by GitHub

Merge pull request #2 from JacobMrox/patch-1

Added typing indicator and asyncio.sleep
parents ee8e88a5 2208c64f
import discord
import os
import random
import pkg_resources
from discord.ext import commands
import asyncio
......@@ -55,6 +56,8 @@ class ChattyCathy:
yield from self.discord_client.process_commands(message)
else:
aiml_response = self.aiml_kernel.respond(message.content)
yield from self.discord_client.send_typing(message.channel)
yield from asyncio.sleep(random.randint(1,3))
yield from self.discord_client.send_message(message.channel, aiml_response)
def run(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment