Я новичек, делаю дискорд бота.
Операционная система: Windows 10
Python 3.9.6
Список библеотек:
aiohttp 3.7.4.post0
async-lru 1.0.2
async-timeout 3.0.1
asyncio 3.4.3
attrs 21.2.0
backports.entry-points-selectable 1.1.0
certifi 2021.5.30
cffi 1.14.6
chardet 4.0.0
charset-normalizer 2.0.3
discord 1.7.3
discord.py 1.7.3
distlib 0.3.2
filelock 3.0.12
h5py 3.3.0
idna 3.2
Keras 2.4.3
keras-datasets 0.1.0
multidict 5.1.0
numpy 1.21.1
Pillow 8.3.1
platformdirs 2.0.2
pyaes 1.6.1
pycparser 2.20
PyNaCl 1.4.0
pyparsing 2.4.7
Pyrogram 1.2.9
PySocks 1.7.1
pyTelegramBotAPI 3.8.1
python-dateutil 2.8.2
PyYAML 5.4.1
requests 2.26.0
scipy 1.7.0
six 1.16.0
typing-extensions 3.10.0.0
urllib3 1.26.6
virtualenv 20.6.0
yarl 1.6.3
youtube-dl 2021.6.6
ОШИБКА!
Ignoring exception in command card_user:
Traceback (most recent call last):
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\iterators.py", line 288, in next
return self.messages.get_nowait()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\asyncio\queues.py", line 189, in get_nowait
raise QueueEmpty
asyncio.queues.QueueEmpty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\channel.py", line 377, in purge
msg = await iterator.next()
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\iterators.py", line 290, in next
raise NoMoreItems()
discord.errors.NoMoreItems
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "c:\proj\botrun3.py", line 138, in card_user
await ctx.channel.purge(limit = 1)
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\channel.py", line 386, in purge
await ret[-1].delete()
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\message.py", line 1023, in delete
await self._state.http.delete_message(self.channel.id, self.id)
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\http.py", line 250, in request
raise NotFound(r, data)
discord.errors.NotFound: 404 Not Found (error code: 10008): Unknown Message
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\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: NotFound:
404 Not Found (error code: 10008): Unknown Message
Помогите пожалуйста
Операционная система: Windows 10
Python 3.9.6
Список библеотек:
aiohttp 3.7.4.post0
async-lru 1.0.2
async-timeout 3.0.1
asyncio 3.4.3
attrs 21.2.0
backports.entry-points-selectable 1.1.0
certifi 2021.5.30
cffi 1.14.6
chardet 4.0.0
charset-normalizer 2.0.3
discord 1.7.3
discord.py 1.7.3
distlib 0.3.2
filelock 3.0.12
h5py 3.3.0
idna 3.2
Keras 2.4.3
keras-datasets 0.1.0
multidict 5.1.0
numpy 1.21.1
Pillow 8.3.1
platformdirs 2.0.2
pyaes 1.6.1
pycparser 2.20
PyNaCl 1.4.0
pyparsing 2.4.7
Pyrogram 1.2.9
PySocks 1.7.1
pyTelegramBotAPI 3.8.1
python-dateutil 2.8.2
PyYAML 5.4.1
requests 2.26.0
scipy 1.7.0
six 1.16.0
typing-extensions 3.10.0.0
urllib3 1.26.6
virtualenv 20.6.0
yarl 1.6.3
youtube-dl 2021.6.6
Python:
@client.command(aliases = ['я', 'карта'])
async def card_user(ctx):
await ctx.channel.purge(limit = 1)
img = Image.new('RGBA', (400, 200), '#e82ad5')
url = str(ctx.author.avatar_url)[:-10]
response = requests.get(url, stream = True)
response = Image.open(io.BytesIO(response.content))
response = Image.convert('RGBA')
response = response.rezize((100, 100), Image.ANTIALIAS)
img.pasta(response, (15, 15, 115, 115))
idraw = ImageDraw.Draw(img)
name = ctx.author.name
tag = ctx.author.discriminator
headline = ImageFont.truetype('arial.ttf', size = 20)
undertext = ImageFont.truetype('arial.ttf', size = 12)
idraw.text((145, 15), f'{name}#{tag}', font = headline)
idraw.text((145, 15), f'ID: {ctx.author.id}', font = undertext)
img.save('user_card.png')
await ctx.send(file = discord.File(fp = 'user_card.png'))
ОШИБКА!
Ignoring exception in command card_user:
Traceback (most recent call last):
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\iterators.py", line 288, in next
return self.messages.get_nowait()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\asyncio\queues.py", line 189, in get_nowait
raise QueueEmpty
asyncio.queues.QueueEmpty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\channel.py", line 377, in purge
msg = await iterator.next()
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\iterators.py", line 290, in next
raise NoMoreItems()
discord.errors.NoMoreItems
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "c:\proj\botrun3.py", line 138, in card_user
await ctx.channel.purge(limit = 1)
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\channel.py", line 386, in purge
await ret[-1].delete()
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\message.py", line 1023, in delete
await self._state.http.delete_message(self.channel.id, self.id)
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\http.py", line 250, in request
raise NotFound(r, data)
discord.errors.NotFound: 404 Not Found (error code: 10008): Unknown Message
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\Ellib\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\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: NotFound:
404 Not Found (error code: 10008): Unknown Message
Помогите пожалуйста