adding ctx to sondage and avis commands
This commit is contained in:
parent
eba1de37f9
commit
d913f7758f
1 changed files with 2 additions and 2 deletions
|
@ -386,7 +386,7 @@ class Utils(commands.Cog):
|
||||||
shuffle(emojis_chosen)
|
shuffle(emojis_chosen)
|
||||||
for i in range(len(args[1:])):
|
for i in range(len(args[1:])):
|
||||||
message += f"{emojis_chosen[i]} -> {propositions[i]}\n"
|
message += f"{emojis_chosen[i]} -> {propositions[i]}\n"
|
||||||
embed = discord.Embed(title = question, description = message, color = discord.Colour.random()).set_footer(text = self._userOrNick(ctx.author), icon_url = ctx.author.avatar_url)
|
embed = discord.Embed(title = question, description = message, color = discord.Colour.random()).set_footer(text = f"Sondage de {self._userOrNick(ctx.author)}", icon_url = ctx.author.avatar_url)
|
||||||
sondage = await ctx.send(embed = embed)
|
sondage = await ctx.send(embed = embed)
|
||||||
for i in range(len(args[1:])):
|
for i in range(len(args[1:])):
|
||||||
await sondage.add_reaction(emoji = emojis_chosen[i])
|
await sondage.add_reaction(emoji = emojis_chosen[i])
|
||||||
|
@ -410,7 +410,7 @@ class Utils(commands.Cog):
|
||||||
for findedId in re.findall(r'\d+', titre): # récupération mention dans titre
|
for findedId in re.findall(r'\d+', titre): # récupération mention dans titre
|
||||||
titre = self._cleanUser(ctx, titre, findedId)
|
titre = self._cleanUser(ctx, titre, findedId)
|
||||||
args = args[1:]
|
args = args[1:]
|
||||||
embed = discord.Embed(title = titre, description = self._cleanCodeStringWithMentionAndURLs(args[0]), color = discord.Colour.random()).set_footer(text = self._userOrNick(ctx.author), icon_url = ctx.author.avatar_url)
|
embed = discord.Embed(title = titre, description = self._cleanCodeStringWithMentionAndURLs(args[0]), color = discord.Colour.random()).set_footer(text = f"Sondage de {self._userOrNick(ctx.author)}", icon_url = ctx.author.avatar_url)
|
||||||
message = await ctx.send(embed = embed)
|
message = await ctx.send(embed = embed)
|
||||||
reactions = ['✅', '🤷', '❌']
|
reactions = ['✅', '🤷', '❌']
|
||||||
for i in reactions:
|
for i in reactions:
|
||||||
|
|
Reference in a new issue