I'm making a discord bot.
What my discord bot does listens to messages throughout the server and prints it real-time.
However, I also want the code to constantly recieve input from me from the console and print it out in a particular server ID. The following is my code:
@bot.event
async def on_message(message):
# Prints message
@bot.event
async def on_ready():
# Execute on-ready stuff
while True:
kb = input(">>>")
#Delivers the message into a certain channel
The problem is after the while True loop is executed, the other on_message functions stop working. I have seen other similar questions but I don't understand the async functions.
Could someone tell me how to both receive input continuously and print out incoming messages real-time?