commit - #11
Conversation
|
Will give this a quick test in the morning. Thanks. :) |
There was a problem hiding this comment.
Just tested, but should have noticed, this doesn't work. You have a call to message.channel.send using await, which is an asyncronous function, however, it's declared inside a syncronous definition; meaning that trying to run gives you the error:
File "~\dolphinbot\dolphinbot.py", line 62
await message.channel.send(file=discord.File(image))
^
SyntaxError: 'await' outside async function
Changing the definition to async returns the below:
~\dolphinbot\dolphinbot.py:1047: RuntimeWarning: coroutine 'meme_commands' was never awaited
meme_commands()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Won't lie, this stuff goes past me. Might be better to pass back values with the function, and then await message.channel.send in on_message?
turned the meme check into a function, also renamed the image files to be their appropriate meme keyword.