Answer the question
In order to leave comments, you need to log in
MongoDB error, googled, did not find, help?
Greetings. I am writing a Blacklist system. And I want to add a user to the database, but it gives me an error. Below code and error
@commands.command()
async def blacklist(self, ctx, id, reason='Ну типо захотел'):
if id is None:
await ctx.send('Введите ид пользователя', delete_after=10)
else:
user = await self.client.fetch_user(id)
bl = discord.Embed(color=discord.Colour.random(), description=
f'{user} был добавлен в чёрный список бота\n'
f'Причина: {reason}'
)
bl.set_author(name='Blacklist system')
bl.set_footer(text=f'ID:{id}')
await ctx.send('Готово', embed=bl)
collection.insert_one({"id":id, "reason":reason})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question