mirror of
https://github.com/miaowware/qrm2.git
synced 2024-11-26 17:58:40 -05:00
Merge pull request #125 from classabbyamp/embed-add-syntax
change embed = embed.add_field() to embed.add_field()
This commit is contained in:
commit
e64c9ba2df
@ -99,10 +99,10 @@ class BaseCog(commands.Cog):
|
||||
embed.title = "About qrm"
|
||||
embed.description = info.description
|
||||
|
||||
embed = embed.add_field(name="Authors", value=", ".join(info.authors))
|
||||
embed = embed.add_field(name="License", value=info.license)
|
||||
embed = embed.add_field(name="Version", value=f'v{info.release}')
|
||||
embed = embed.add_field(name="Contributing", value=info.contributing, inline=False)
|
||||
embed.add_field(name="Authors", value=", ".join(info.authors))
|
||||
embed.add_field(name="License", value=info.license)
|
||||
embed.add_field(name="Version", value=f'v{info.release}')
|
||||
embed.add_field(name="Contributing", value=info.contributing, inline=False)
|
||||
embed.set_thumbnail(url=str(self.bot.user.avatar_url))
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
|
@ -76,16 +76,16 @@ class StudyCog(commands.Cog):
|
||||
embed.title = question['id']
|
||||
embed.description = self.source
|
||||
embed.colour = cmn.colours.good
|
||||
embed = embed.add_field(name='Question:', value=question['text'], inline=False)
|
||||
embed = embed.add_field(name='Answers:', value='**A:** ' + question['answers']['A'] +
|
||||
'\n**B:** ' + question['answers']['B'] +
|
||||
'\n**C:** ' + question['answers']['C'] +
|
||||
'\n**D:** ' + question['answers']['D'],
|
||||
inline=False)
|
||||
embed = embed.add_field(name='Answer:', value='Type _?rqa_ for answer', inline=False)
|
||||
embed.add_field(name='Question:', value=question['text'], inline=False)
|
||||
embed.add_field(name='Answers:', value='**A:** ' + question['answers']['A'] +
|
||||
'\n**B:** ' + question['answers']['B'] +
|
||||
'\n**C:** ' + question['answers']['C'] +
|
||||
'\n**D:** ' + question['answers']['D'],
|
||||
inline=False)
|
||||
embed.add_field(name='Answer:', value='Type _?rqa_ for answer', inline=False)
|
||||
if 'image' in question:
|
||||
image_url = f'https://hamstudy.org/_1330011/images/{selected_pool.split("_",1)[1]}/{question["image"]}'
|
||||
embed = embed.set_image(url=image_url)
|
||||
embed.set_image(url=image_url)
|
||||
self.lastq[ctx.message.channel.id] = (question['id'], question['answer'])
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user