Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrelated Answers #15

Closed
Hunter2809 opened this issue Apr 24, 2021 · 1 comment
Closed

Unrelated Answers #15

Hunter2809 opened this issue Apr 24, 2021 · 1 comment

Comments

@Hunter2809
Copy link

Hunter2809 commented Apr 24, 2021

Hey!

I am using this API in my discord bot, and it answers with unrelated things. Idk what's the problem. I saw another issue, which didn't continue, so I opened mine. Here is the code to the same -->

@bot.listen('on_message')
async def ai(message):
	await bot.wait_until_ready()
	if message.author == bot.user:
		return
	channel = message.channel
	if message.channel.id != 835564299854020628:
		return
	if message.channel.id == 835564299854020628:
		reply = await bot.rs.get_ai_response(message)
		await message.channel.send(reply)

Ik it's all messed up (the spacing and stuff), but please bear with me. If u want, contact me on discord, would be much easier. Here is me USER ID --> нυηтєя#8785. Please ping me if anyone knows the solution to this!

Thanks!

@Hunter2809
Copy link
Author

Oh sorry for the problem caused. I have fixed the thing. The problem was get_ai_response(message). The message here belongs to the discord.Message class object. I fixed it by adding the content attribute to the Message object... This fixed my problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant