|
|
|
@ -80,22 +80,22 @@ class Fun:
|
|
|
|
a = a * (i + 1)
|
|
|
|
a = a * (i + 1)
|
|
|
|
return a
|
|
|
|
return a
|
|
|
|
|
|
|
|
|
|
|
|
# @commands.command()
|
|
|
|
@commands.command()
|
|
|
|
# @commands.cooldown(1, 5, type=commands.BucketType.user)
|
|
|
|
@commands.cooldown(1, 5, type=commands.BucketType.user)
|
|
|
|
# async def fact(self, ctx, number:int):
|
|
|
|
async def fact(self, ctx, number:int):
|
|
|
|
# if number < 20001 and number > 0:
|
|
|
|
if number < 20001 and number > 0:
|
|
|
|
# n = 1990
|
|
|
|
n = 1990
|
|
|
|
# with ctx.channel.typing():
|
|
|
|
with ctx.channel.typing():
|
|
|
|
# a = await self.bot.loop.run_in_executor(None, self.get_factorial, number)
|
|
|
|
a = await self.bot.loop.run_in_executor(None, self.get_factorial, number)
|
|
|
|
# if len(str(a)) > 6000:
|
|
|
|
if len(str(a)) > 6000:
|
|
|
|
# for b in [str(a)[i:i+n] for i in range(0, len(str(a)), n)]:
|
|
|
|
for b in [str(a)[i:i+n] for i in range(0, len(str(a)), n)]:
|
|
|
|
# await ctx.author.send(f'```py\n{b}```')
|
|
|
|
await ctx.author.send(f'```py\n{b}```')
|
|
|
|
# await ctx.send(f"{ctx.author.mention} Check your DMs.")
|
|
|
|
await ctx.send(f"{ctx.author.mention} Check your DMs.")
|
|
|
|
# else:
|
|
|
|
else:
|
|
|
|
# for b in [str(a)[i:i+n] for i in range(0, len(str(a)), n)]:
|
|
|
|
for b in [str(a)[i:i+n] for i in range(0, len(str(a)), n)]:
|
|
|
|
# await ctx.send(f'```py\n{b}```')
|
|
|
|
await ctx.send(f'```py\n{b}```')
|
|
|
|
# else:
|
|
|
|
else:
|
|
|
|
# await ctx.send("Invalid number. Please enter a number between 0 and 20,000")
|
|
|
|
await ctx.send("Invalid number. Please enter a number between 0 and 20,000")
|
|
|
|
|
|
|
|
|
|
|
|
@commands.command(hidden=True)
|
|
|
|
@commands.command(hidden=True)
|
|
|
|
@commands.is_owner()
|
|
|
|
@commands.is_owner()
|
|
|
|
|