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}.")
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}.")
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}.")
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}.")
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}." )