Closed Supersebi3 closed 6 years ago
The problem might also be seperate, non-async functions I define in that extension as well as in a different file giving the same error
Can you send the code from your Fun.py cog?
Are you working on this?
Yes, this is being worked on. It involves a complete rewrite of how I handle all functions.
For a temporary fix, change line 33 to: await self.bot.edit_message(pongmsg, "{}{}ms!".format(pong, str(int(timedelta_milliseconds(pongmsg.timestamp-ctx.message.timestamp)))))
and then run async2rewrite.
So wait, does that mean the problem are keyword arguments?
Ok i think i understood it: edit_message needs at least 2 non-keyword argments. I had a different file with the same issue, but I fixed it by changing edit_message(msg, embed=em)
to edit_message(msg, "", embed=em)
This has been solved with the latest update (0.1.4).
I managed to install the module, but now the module is having problems with my Fun.py extension. The error message says:
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/async2rewrite/transformers.py", line 419, in stateful_edit_message content = call.args[1] IndexError: list index out of range
I tried it with and withoutremove_parens=True
, it worked with other files, I have no idea how i could fix this...Edit: the problem might be f-strings