No ... w
Even if you answer a question on the discord board, "Ah ... Wai was old ..." I'm sorry for those who answered that, and above all, it's a pity that I'm using a much older version.
I'm sure other than me "I know I have to upgrade, but I don't know what kind of wall is waiting ... I'll do it next month." I believe that there are people who think that, and I hope I can share my courage with them.
Basically,
If you just repeat it, it will be quite good.
Also, it is safer to separate it from the existing environment with virtualenv of pyenv. Also, if you manage it with git etc., let's cut the branch (naturally)
Let's write it.
If there is a place where the id is taken and something is processed or branched, and if there is a place surrounded by a single coat to distinguish it, I will remove it. If you really want to do it as usual,
str(client.user.id)
I'll put it in the form of.
async
await client.send_message(message.channel, "message")
rewrite
await message.channel.send(res)
async
await client.send_file(message.channel, res)
rewrite
await message.channel.send(file=discord.File(res,))
You use the same method as when sending a message. It is assumed that res contains the path to the image you want to attach. Also, be careful where you pass it as a tuple. (If you want to paste more than one, you can usually separate them with commas)
async
await client.add_reaction(message, e)
rewrite
await message.add_reaction(e)
Um ...
It's over! !! w
I thought there were more, but when I tried it, it was like this. (In my case)
Perhaps the number of correction lines was about 5 lines. (There were two lines where the id was directly written and judged by str)
The most important thing in this article is that it's not a big deal except if you try it, so let's start doing it for the time being! !! I think that will be the case!
Maybe I just overlooked it and I have to fix something else, If there is such a thing, I would like to add it as appropriate.
Recommended Posts