Optimized some code, now media checkers will return a formatted string containing the converted hyperlink, which will then be used by the await statements at the end
added a check to ensure that description is valid, not adding a check produces a warning, not really an error but it's a quick check just to ensure everything runs without clogging the log.
changed response to actually reply to the original sender instead of just sending a corresponding message in the chat. better tracking
Error Below:
Ignoring exception in on_message
Traceback (most recent call last):
File "C:\Users\chai\Desktop\man-chan\venv\lib\site-packages\disnake\client.py", line 703, in _run_event
await coro(*args, **kwargs)
File "C:\Users\chai\Desktop\man-chan\cogs\mediaconverter.py", line 32, in on_message
await message.reply(content=description, mention_author=False)
File "C:\Users\chai\Desktop\man-chan\venv\lib\site-packages\disnake\message.py", line 2117, in reply
return await self.channel.send(content, reference=reference, **kwargs)
File "C:\Users\chai\Desktop\man-chan\venv\lib\site-packages\disnake\abc.py", line 1748, in send
data = await state.http.send_message(
File "C:\Users\chai\Desktop\man-chan\venv\lib\site-packages\disnake\http.py", line 415, in request
raise HTTPException(response, data)
disnake.errors.HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
Traceback (most recent call last):
Close re-open #42
description
is valid, not adding a check produces a warning, not really an error but it's a quick check just to ensure everything runs without clogging the log.Error Below: