【发布时间】:2020-10-26 02:23:54
【问题描述】:
elif message.content.find("{memes") != -1:
a = "https://imgur.com/Jlhfk4F"
b = "https://i.imgur.com/seC2lyP.jpg?play"
c = "https://imgur.com/CZyB2Zz"
d = "https://imgur.com/N4KQcJ5"
e = "https://imgur.com/kuDuY0b"
f = "https://imgur.com/z6uMw0q"
g = "https://imgur.com/gAa9Poq"
h = "https://imgur.com/7dh4NFR"
i = "https://imgur.com/ox8BQqv"
j = "https://imgur.com/iLMRDZY"
k = "https://imgur.com/UG0sLCd"
l = "https://imgur.com/peCVHpF"
m = "https://imgur.com/XgBE3Pu"
n = "https://i.imgur.com/zoBayy9.jpg?play"
o = "https://imgur.com/2wDk09q"
p = "https://imgur.com/mz62oay"
secret = random.choices([a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p])
await message.channel.send(secret)
这是我用于我的机器人的随机 meme 命令的当前代码。出于某种原因,机器人发送的链接两边都有方括号,就像这样
['https://imgur.com/7dh4NFR']
有人可以帮我吗?
【问题讨论】:
标签: python python-3.x pycharm discord.py discord.py-rewrite