Ask coding questions

← Back to all posts
I did the thing with the secret and nothing happens, even not a " We have logging as..."
HamzaRice

My thing
import discord
import os

my_secret = os.environ['DATABASE_PASSWORD']

client = discord.Client()

@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))

@client.event
async def on_message(message):
if message.author == client.user:
return

Pls help

Voters
HamzaRice
Comments
hotnewtop
19ecal

Add client.run(my_secret) to the bottom of the file and hopefully it should work