Commit 5667eb62 authored by NanoDano's avatar NanoDano

Stable working version

parent 39226344
......@@ -9,8 +9,6 @@ Artificial intelligence (AI) chat bot for Discord written in Python
## Running
cathy --help
## TODO
......
import discord
import os
import pkg_resources
from discord.ext import commands
import asyncio
import aiml
import requests
import os
STARTUP_FILE = "std-startup.xml"
......@@ -17,11 +18,12 @@ class ChattyCathy:
# Load AIML kernel
self.aiml_kernel = aiml.Kernel()
current_dir = os.getcwd()
os.chdir(os.path.dirname(os.path.realpath(__file__)))
self.aiml_kernel.learn(STARTUP_FILE)
initial_dir = os.getcwd()
os.chdir(pkg_resources.resource_filename(__name__, '')) # Change directories to load AIML files properly
startup_filename = pkg_resources.resource_filename(__name__, STARTUP_FILE)
self.aiml_kernel.learn(startup_filename)
self.aiml_kernel.respond("LOAD AIML B")
os.chdir(current_dir)
os.chdir(initial_dir)
# Set up Discord client
self.discord_client = discord.Client()
......
......@@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='cathy',
version='0.1.6',
version='0.1.7',
description='Discord chat bot using AIML artificial intelligence.',
url='https://github.com/NanoDano/ChattyCathy',
author='DevDungeon',
......@@ -13,6 +13,13 @@ setup(
'bin/cathy',
'bin/cathy.bat',
],
package_data={
'cathy': [
'std-startup.xml',
'aiml/alice/*.aiml',
'aiml/custom/*.aiml'
],
},
zip_safe=False,
install_requires=[
'docopt',
......
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