Every attempt to pull information from DB about user returns None.
None
My code:
@bot.command() async def warnings(ctx, user:discord.Member = None): client = MongoClient('connection') db = client.gettingStarted collection = db.Warning if user == None: await ctx.send('Please give a valid user') else: x = collection.find_one({"id":f"{user.id}"}) print(x)
What can be the problem?
2.1m questions
2.1m answers
60 comments
57.0k users