Merge pull request #125 from classabbyamp/embed-add-syntax

change embed = embed.add_field() to embed.add_field()
This commit is contained in:
Abigail Gold 2019-12-23 10:41:37 -05:00 committed by GitHub
commit e64c9ba2df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View File

@ -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)

View File

@ -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)