mirror of
				https://gitlab.com/ddorn/tfjm-discord-bot.git
				synced 2025-10-29 23:39:52 +01:00 
			
		
		
		
	✨ <3 alias for hug
This commit is contained in:
		| @@ -133,8 +133,8 @@ class MiscCog(Cog, name="Divers"): | |||||||
|     async def pew(self, ctx): |     async def pew(self, ctx): | ||||||
|         await ctx.send("Tu t'es raté ! Kwaaack :duck:") |         await ctx.send("Tu t'es raté ! Kwaaack :duck:") | ||||||
|  |  | ||||||
|     @command() |     @command(aliases=["<3"]) | ||||||
|     async def hug(self, ctx, who): |     async def hug(self, ctx, who="everyone"): | ||||||
|         """Fait un câlin à quelqu'un.""" |         """Fait un câlin à quelqu'un.""" | ||||||
|  |  | ||||||
|         if who != "everyone": |         if who != "everyone": | ||||||
| @@ -144,10 +144,7 @@ class MiscCog(Cog, name="Divers"): | |||||||
|                 try: |                 try: | ||||||
|                     who = await MemberConverter().convert(ctx, who) |                     who = await MemberConverter().convert(ctx, who) | ||||||
|                 except BadArgument: |                 except BadArgument: | ||||||
|                     return await ctx.send( |                     return await ctx.send(f'Il n\'y a pas de "{who}". :man_shrugging:') | ||||||
|                         f'Je ne connais pas "{who}", verifie l\'orthographe ' |  | ||||||
|                         f"et n'oublie pas les guillemets si il y a des espaces dans son nom. :wink:" |  | ||||||
|                     ) |  | ||||||
|         else: |         else: | ||||||
|             who = ctx.guild.default_role |             who = ctx.guild.default_role | ||||||
|         who: Union[discord.Role, Member] |         who: Union[discord.Role, Member] | ||||||
| @@ -186,6 +183,8 @@ class MiscCog(Cog, name="Divers"): | |||||||
|                 "C'est pas très COVID-19 tout ça !", |                 "C'est pas très COVID-19 tout ça !", | ||||||
|                 "Tout le monde est heureux maintenant !", |                 "Tout le monde est heureux maintenant !", | ||||||
|             ] |             ] | ||||||
|  |         elif who == self.bot.user: | ||||||
|  |             bonuses += ["Je trouve ça très bienveillant <3"] | ||||||
|         else: |         else: | ||||||
|             msg = f"{ctx.author.mention} fait un gros câlin à {who.mention} !" |             msg = f"{ctx.author.mention} fait un gros câlin à {who.mention} !" | ||||||
|             bonuses += [ |             bonuses += [ | ||||||
| @@ -218,7 +217,6 @@ class MiscCog(Cog, name="Divers"): | |||||||
|         role_id = FAN_CLUBS.get(who.id, None) |         role_id = FAN_CLUBS.get(who.id, None) | ||||||
|         role = get(ctx.guild.roles, id=role_id) |         role = get(ctx.guild.roles, id=role_id) | ||||||
|  |  | ||||||
|         print(FAN_CLUBS, who.id, role_id, role) |  | ||||||
|         if role is not None: |         if role is not None: | ||||||
|             await ctx.author.add_roles(role) |             await ctx.author.add_roles(role) | ||||||
|             await ctx.send(f"Bienvenue au {role.mention} !! :tada:") |             await ctx.send(f"Bienvenue au {role.mention} !! :tada:") | ||||||
|   | |||||||
| @@ -476,7 +476,6 @@ class TirageCog(Cog, name="Tirages"): | |||||||
|                 if n != n:  # NaN |                 if n != n:  # NaN | ||||||
|                     raise TfjmError("Nan, ça je peux pas faire !") |                     raise TfjmError("Nan, ça je peux pas faire !") | ||||||
|                 if not n.is_integer(): |                 if not n.is_integer(): | ||||||
|                     print(n) |  | ||||||
|                     raise TfjmError( |                     raise TfjmError( | ||||||
|                         "Un dé avec des fractions de faces ? " |                         "Un dé avec des fractions de faces ? " | ||||||
|                         "Si tu me donnes un patron, je le lancerai !" |                         "Si tu me donnes un patron, je le lancerai !" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user