Open
Description
Hello, I'm creating a chatterbot with this library in nextcord to use in discord and it works, but it doesn't create the "db.sqlite3" file that makes possible to learn new words and I'm trying to solve this bug, in case anyone have an idea of solving this problem, I would like to comment here.
if i resolve, i'll tell how i did it
The code:
#imports
import nextcord
from nextcord.ext import commands
from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
#variable
bot = commands.Bot(command_prefix='$', activity=nextcord.Game(name='!co pra falar comigo!'))
chatbot = ChatBot('Cobaia')
#conversation list
conversation = [
'Ola',
'Ola, tudo bem?',
'Tudo e você?',
'Estou bem',
'Faz o que de bom?',
'Conversando',
'Você gosta de comida?',
'Sim, eu amo comer e você?',
'Eu também'
]
#chatterbot train
trainer = ListTrainer(chatbot)
trainer.train(conversation)
#bot online warning
@bot.event
async def on_ready():
print(f'Ola mestre! me loguei como {bot.user}')
#chatterbot command
@bot.event
async def on_message(message):
if message.author == bot.user:
return
if message.content.startswith('!co'):
response = chatbot.get_response('')
await message.channel.send(response)
#run
bot.run('token')
I'm not good in english, but i understand if you write in english
Metadata
Metadata
Assignees
Labels
No labels