mirror of
https://github.com/miaowware/qrm2.git
synced 2025-07-03 00:25:15 -04:00
damn you flake8
This commit is contained in:
parent
528307f22f
commit
b64c7ee39a
@ -53,7 +53,8 @@ class StudyCog(commands.Cog):
|
|||||||
embed.colour = cmn.colours.bad
|
embed.colour = cmn.colours.bad
|
||||||
for cty in study.pool_names:
|
for cty in study.pool_names:
|
||||||
levels = '`, `'.join(study.pool_names[cty].keys())
|
levels = '`, `'.join(study.pool_names[cty].keys())
|
||||||
embed.add_field(name=f"**Country: `{cty}` {study.pool_emojis[cty]}**", value=f"Levels: `{levels}`", inline=False)
|
embed.add_field(name=f"**Country: `{cty}` {study.pool_emojis[cty]}**",
|
||||||
|
value=f"Levels: `{levels}`", inline=False)
|
||||||
embed.add_field(name="**Random**", value="To select a random pool or country, use `random` or `r`")
|
embed.add_field(name="**Random**", value="To select a random pool or country, use `random` or `r`")
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
return
|
return
|
||||||
@ -70,7 +71,8 @@ class StudyCog(commands.Cog):
|
|||||||
embed.colour = cmn.colours.bad
|
embed.colour = cmn.colours.bad
|
||||||
for cty in study.pool_names:
|
for cty in study.pool_names:
|
||||||
levels = '`, `'.join(study.pool_names[cty].keys())
|
levels = '`, `'.join(study.pool_names[cty].keys())
|
||||||
embed.add_field(name=f"**Country: `{cty}` {study.pool_emojis[cty]}**", value=f"Levels: `{levels}`", inline=False)
|
embed.add_field(name=f"**Country: `{cty}` {study.pool_emojis[cty]}**",
|
||||||
|
value=f"Levels: `{levels}`", inline=False)
|
||||||
embed.add_field(name="**Random**", value="To select a random pool or country, use `random` or `r`")
|
embed.add_field(name="**Random**", value="To select a random pool or country, use `random` or `r`")
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
return
|
return
|
||||||
@ -98,7 +100,8 @@ class StudyCog(commands.Cog):
|
|||||||
embed.colour = cmn.colours.bad
|
embed.colour = cmn.colours.bad
|
||||||
for cty in study.pool_names:
|
for cty in study.pool_names:
|
||||||
levels = '`, `'.join(study.pool_names[cty].keys())
|
levels = '`, `'.join(study.pool_names[cty].keys())
|
||||||
embed.add_field(name=f"**Country: `{cty}` {study.pool_emojis[cty]}**", value=f"Levels: `{levels}`", inline=False)
|
embed.add_field(name=f"**Country: `{cty}` {study.pool_emojis[cty]}**",
|
||||||
|
value=f"Levels: `{levels}`", inline=False)
|
||||||
embed.add_field(name="**Random**", value="To select a random pool or country, use `random` or `r`")
|
embed.add_field(name="**Random**", value="To select a random pool or country, use `random` or `r`")
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
return
|
return
|
||||||
@ -129,7 +132,8 @@ class StudyCog(commands.Cog):
|
|||||||
f"\n**{cmn.emojis.d}** {question['answers']['D']}"),
|
f"\n**{cmn.emojis.d}** {question['answers']['D']}"),
|
||||||
inline=False)
|
inline=False)
|
||||||
embed.add_field(name='To Answer:',
|
embed.add_field(name='To Answer:',
|
||||||
value='Answer with reactions below. If not answered within 10 minutes, the answer will be revealed.',
|
value=('Answer with reactions below. If not answered within 10 minutes,'
|
||||||
|
' the answer will be revealed.'),
|
||||||
inline=False)
|
inline=False)
|
||||||
if 'image' in question:
|
if 'image' in question:
|
||||||
image_url = f'https://hamstudy.org/_1330011/images/{pool.split("_",1)[1]}/{question["image"]}'
|
image_url = f'https://hamstudy.org/_1330011/images/{pool.split("_",1)[1]}/{question["image"]}'
|
||||||
@ -143,7 +147,9 @@ class StudyCog(commands.Cog):
|
|||||||
await cmn.add_react(q_msg, cmn.emojis.d)
|
await cmn.add_react(q_msg, cmn.emojis.d)
|
||||||
|
|
||||||
def check(reaction, user):
|
def check(reaction, user):
|
||||||
return user.id != self.bot.user.id and reaction.message.id == q_msg.id and str(reaction.emoji) in self.choices.keys()
|
return (user.id != self.bot.user.id
|
||||||
|
and reaction.message.id == q_msg.id
|
||||||
|
and str(reaction.emoji) in self.choices.keys())
|
||||||
|
|
||||||
try:
|
try:
|
||||||
reaction, user = await self.bot.wait_for('reaction_add', timeout=600.0, check=check)
|
reaction, user = await self.bot.wait_for('reaction_add', timeout=600.0, check=check)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user