def qrcode(self, ctx, *, text: str):
"""Create a QR code.
Usage: qrcode [text to use]"""
img_bytes = BytesIO()
image = await self.loop.run_in_executor(None, qrcode.make, text)
image.save(img_bytes, format='PNG')
img_bytes.seek(0)
await ctx.send(file=discord.File(img_bytes, 'qrcode.png'))
评论列表
文章目录