Как я могу отправить встраивание через моего бота Discord с помощью Python? ⇐ Python
-
Anonymous
Как я могу отправить встраивание через моего бота Discord с помощью Python?
I've been working on a Discord bot, and I'd like to make things more custom.
I've been trying to make the bot send embeds, instead of normal messages.
embed = discord.Embed(title="Tile", description="Desc", color=0x00ff00) embed.add_field(name="Fiel1", value="hi", inline=False) embed.add_field(name="Field2", value="hi2", inline=False) await self.bot.say(embed=embed) When executing this code, I get the error that Embed is not a valid member of the module discord. All websites show me similar code, and I do not know any other way to send an embed.
Источник: https://stackoverflow.com/questions/448 ... t-w-python
I've been working on a Discord bot, and I'd like to make things more custom.
I've been trying to make the bot send embeds, instead of normal messages.
embed = discord.Embed(title="Tile", description="Desc", color=0x00ff00) embed.add_field(name="Fiel1", value="hi", inline=False) embed.add_field(name="Field2", value="hi2", inline=False) await self.bot.say(embed=embed) When executing this code, I get the error that Embed is not a valid member of the module discord. All websites show me similar code, and I do not know any other way to send an embed.
Источник: https://stackoverflow.com/questions/448 ... t-w-python