From 59fa5b361381949beffb2e555d03357a408bf29d Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 13 Jan 2023 07:09:35 -0600 Subject: [PATCH] [Discord] Add lcm command --- Discord/cogs/math.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Discord/cogs/math.py b/Discord/cogs/math.py index 10d78fa7c0..0625c692a1 100644 --- a/Discord/cogs/math.py +++ b/Discord/cogs/math.py @@ -83,6 +83,11 @@ async def gcd(self, ctx, *integers: int): """Greatest common divisor""" await ctx.embed_reply(math.gcd(*integers)) + @commands.command(aliases = ["least_common_multiple"]) + async def lcm(self, ctx, *integers: int): + """Least common multiple""" + await ctx.embed_reply(math.lcm(*integers)) + @commands.command(aliases = ['π']) async def pi(self, ctx, digits: int = 3, start: int = 1): '''Digits of pi'''