Esempio n. 1
0
 async def clearlowlimit(self, ctx):
     """Set the low size limit (floor)."""
     guilddata = guilddb.loadOrCreate(ctx.guild.id)
     guilddata.low_limit = None
     guilddb.save(guilddata)
     await ctx.send("There is now no lowest allowed size in this guild.")
     logger.info(f"Cleared low size cap in guild {ctx.guild.id}.")
Esempio n. 2
0
 async def clearlargest(self, ctx):
     """Clear the role of 'largest user.'"""
     guilddata = guilddb.loadOrCreate(ctx.guild.id)
     guilddata.large_edge = None
     guilddb.save(guilddata)
     await ctx.send("Largest user unset.")
     logger.info(f"Largest user unset in guild {ctx.guild.id}.")
Esempio n. 3
0
 async def clearhighlimit(self, ctx):
     """Set the high size limit (ceiling)."""
     guilddata = guilddb.loadOrCreate(ctx.guild.id)
     guilddata.high_limit = None
     guilddb.save(guilddata)
     await ctx.send("There is now no highest allowed size in this guild.")
     logger.info(f"Cleared high size cap in guild {ctx.guild.id}.")
Esempio n. 4
0
 async def sethighlimit(self, ctx, *, size: SV):
     """Set the high size limit (ceiling)."""
     guilddata = guilddb.loadOrCreate(ctx.guild.id)
     guilddata.high_limit = size
     guilddb.save(guilddata)
     await ctx.send(
         f"{size:,.3mu} is now the highest allowed size in this guild.")
     logger.info(
         f"{size:,.3mu} is now the high size cap in guild {ctx.guild.id}.")
Esempio n. 5
0
 async def setlargest(self, ctx, *, member: discord.Member):
     """Set the largest user."""
     guilddata = guilddb.loadOrCreate(ctx.guild.id)
     guilddata.large_edge = member.id
     guilddb.save(guilddata)
     await ctx.send(
         f"<@{member.id}> is now the largest user. They will be automatically adjusted to be the largest user until they are removed from this role."
     )
     logger.info(
         f"{member.name} ({member.id}) is now the largest user in guild {ctx.guild.id}."
     )
Esempio n. 6
0
 async def edges(self, ctx):
     """See who is set to be the smallest and largest users."""
     guilddata = guilddb.loadOrCreate(ctx.guild.id)
     await ctx.send(
         f"**SERVER-SET SMALLEST AND LARGEST USERS:**\nSmallest: {'*Unset*' if guilddata.small_edge is None else guilddata.small_edge}\nLargest: {'*Unset*' if guilddata.large_edge is None else guilddata.large_edge}"
     )
Esempio n. 7
0
 async def limits(self, ctx):
     """See the guild's current caps."""
     guilddata = guilddb.loadOrCreate(ctx.guild.id)
     await ctx.send(
         f"**SERVER-SET LOW CAPS AND HIGH CAPS:**\nLow Limit: {'*Unset*' if guilddata.low_limit is None else guilddata.low_limit}\nHigh Limit: {'*Unset*' if guilddata.high_limit is None else guilddata.high_limit}"
     )