event loop is closed discord.py code example
Example: event loop is closed discord.py
You need to go your your Development Panel of the Discord Bot, click on the Bot tab, and there you will find a TOKEN, it says Reveal Token, you just need to click COPY.
Then, on your code you need to establish that token like this.
import discord
from discord.ext import commands
TOKEN = "here paste your token"
client=commands.Bot(command_prefix = '.')
@client.event
async def on_ready():
print('Connected')
client.run(TOKEN)
This will fix your problem, Enjoy coding!