# Запуск бота
bot.run( token )
то появляется ошибка:
C:\Users\User\Desktop\messages>python mes.py
Бот подключен к Send#3893
Ignoring exception in command dm:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "mes.py", line 24, in dm
await member.send(message)
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\abc.py", line 864, in send
channel = await self._get_channel()
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\member.py", line 250, in _get_channel
ch = await self.create_dm()
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\member.py", line 110, in general
return getattr(self._user, x)(*args, **kwargs)
AttributeError: 'ClientUser' object has no attribute 'create_dm'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 859, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'ClientUser' object has no attribute 'create_dm'
```
```
await member.send(message)
# Запуск бота
bot.run( token )
то появляется ошибка:
C:\Users\User\Desktop\messages>python mes.py
Бот подключен к Send#3893
Ignoring exception in command dm:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "mes.py", line 24, in dm
await member.send(message)
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\abc.py", line 864, in send
channel = await self._get_channel()
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\member.py", line 250, in _get_channel
ch = await self.create_dm()
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\member.py", line 110, in general
return getattr(self._user, x)(*args, **kwargs)
AttributeError: 'ClientUser' object has no attribute 'create_dm'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 859, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'ClientUser' object has no attribute 'create_dm'
```