#How would i have the bot continously take user input and reply?

1 messages · Page 1 of 1 (latest)

quasi sinew
#

I am basically connecting chat gpt into my discord bot. The whole idea is, you type in >>gpt and the bot creates a thread for you to have a conversation with chatgpt (via openai api). but to do this, i would need to constantly take user input and respond to it. How would i go about doing this?

#

i use pycord 2.0.0 btw

neon goblet
#
  1. Please update pycord
  2. Use @listener on_message
quasi sinew
#

yes but then the bot would respond to everything right?

#

i want it to respond only to messages sent by an individual in a specific thread after they've run >>gpt

neon goblet
#

Create command, which will create thread and store it id in cache

#

then, only respond if user sent message in thread which is in the cache

quasi sinew
#

ah, that makes a lot of sense. thank you

#

also, is pycord 2.0 outdated?

neon goblet
#

Yes

quasi sinew
#

F. eh i will learn 3.0 later

#

thanks for your help btw. i really appreciate it

neon goblet
# quasi sinew F. eh i will learn 3.0 later

There is not ETA for 3.0
It can come out today, it can come out in the next year
Please, just update your pycord regularly, your code will not break because of that, but you will also receive QoL changes and security updates

quasi sinew
#

ah, i just ran the commands it told me to run over on pycord guide

neon goblet
#

?

quasi sinew
neon goblet
#

just pip install -U py-cord

quasi sinew
#

ye im running it rn

#

ah yes, pycord 2.4.1

neon goblet
#

🎉

quasi sinew
#

🎉 !

#

thanks

neon goblet
#

.close

carmine garnetBOT
#

Done with your help thread?

Please close your own help thread by using </close:1009144375709814897> with @tired pulsar.

Backup bot: </solved:1109625445990793246> (or .solved) with @carmine garnet.

quasi sinew
#

.close

carmine garnetBOT
#

Done with your help thread?

Please close your own help thread by using </close:1009144375709814897> with @tired pulsar.

Backup bot: </solved:1109625445990793246> (or .solved) with @carmine garnet.

quasi sinew
#

/solved

#

.solved