1

Here's my code.

import discord
import os
import random
import asyncio
from discord import channel
from dotenv import load_dotenv
from neuralintents import GenericAssistant
from discord.ext import commands

chatbot = GenericAssistant('intents.json')
chatbot.train_model()
chatbot.save_model()

print("Bot running...")

client = commands.Bot(command_prefix="<")

load_dotenv()
TOKEN = os.getenv('token')



@client.event
async def on_ready():
    print("Bot is ready!")

@client.event 
async def on_message(message):
    if message.author == client.user:
        return
    if message.content.startswith("jag"):
        response = chatbot.request(message.content[4:])
        await message.channel.send(response)

@client.command()
async def hello(ctx):
    await ctx.send("hi!")
    
client.run("token")

I don't know where's my mistake. It prints both Bot running... and Bot is ready! But when I run the command, it don't respond to it. that' is <hello.

Can you help me to solve it? Thankyou!

https://i.stack.imgur.com/crJY8.png

0 Answers0