Traceback (most recent call last):
File "main.py", line 19, in <module>
client.run(os.getenv('TOKEN'))
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 723, in run
return future.result()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 702, in runner
await self.start(*args, **kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 665, in start
await self.login(*args, bot=bot)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 511, in login
await self.http.static_login(token.strip(), bot=bot)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/http.py", line 304, in static_login
raise LoginFailure('Improper token has been passed.') from exc
discord.errors.LoginFailure: Improper token has been passed.
I have not even refreshed the token
if I refresh token then I’ve also putted it in .env file pls help the code that I type
import discord
import os
client = discord.Client()
@client.event
async def on_ready():
print('we have logged in as {0.user}'.format(client))
@client.event
async def on_messages(message):
if message.author == client.user:
return
if message.content.startswith('!hi'):
await message.channel.send('hello im dogge bot nice to meet you :D')
client.run(os.getenv('TOKEN'))
If there is any problem in code then help me out I’m gonna make a advance bot so iam testing
