I want to run a DISCORD responsive BOT with a Google colaboratory PYTHON3 file.
You can do it normally on AWS Cloud9, but if you do it with colaboratory as follows
I get a "Runtime Error: Event loop is closed" error and cannot execute successfully.
Contents of code cell 1:
! pip install discord
Contents of code cell 2:
client = discord.Client ()
async def on_ready ():
print ('Logged in as')
async def on_message (message):
if message.content.startswith ("Hello"):
m = "Hello," + message.author.name + "Mr."
await client.send_message (message.channel, m)
client.run ("Set DISCORD token here")
If i execute cells 1 and 2 in order with the above contents, 2
I get the error.
What's missing or wrong to successfully start a BOT?
What I want to do is to return text or images after commenting on DISCORD in colaboratory.
The above logic is just a sample. As long as the error can be resolved, the process I want to implement is already
Since it is completed, it is in a state where the purpose can be achieved.
Answer # 1
It's not an answer, but once this error is fixed, Google Colaboratory will disconnect over time, so you should think that it can't do permanent processing like a bot.
- python - i want to be able to send images in response to a specific word on discord bot
- python - i want to switch images using itemconfig in the gui, but it doesn't work
- display images by drag and drop on wxpython gui
- python - error loading images in anaconda environment
- python 3x - python3 tkinter no response when closing window
- python - i want to connect the images in two folders in order
- python - images are not displayed in the flask app launched with docker
- how to automate tweets with images from spython with json files
- python - i want to move images with pygame
- python - i want to download images from flickr
- python - typeerror when calculating the array of images called by imageopen ()
- i want to click and number a few images like a switch in python
- i want to display images periodically in python, what should i do?
- python - i can't send multiple images with the line api
- python - how to stream images processed by opencv in real time
- python - i can't display django images
- python - icrawler cannot save images
- python 3x - i want to make one image transparent when overlaying two images
- python 3x - how to delete images dragged and dropped into gui created with wxpython