From a1c902074a8cd5df86591b137f5b04f1c55756b7 Mon Sep 17 00:00:00 2001 From: Natalie Fearnley Date: Mon, 20 May 2024 11:21:21 -0400 Subject: [PATCH] fixed stop_changs --- sizebot/cogs/change.py | 6 +++--- sizebot/cogs/register.py | 4 ---- sizebot/cogs/set.py | 4 ++-- sizebot/cogs/setbase.py | 3 +-- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/sizebot/cogs/change.py b/sizebot/cogs/change.py index 92bff607..7fb671c8 100644 --- a/sizebot/cogs/change.py +++ b/sizebot/cogs/change.py @@ -5,7 +5,7 @@ from sizebot.lib import errors, utils from sizebot.lib.digidecimal import Decimal -from discord import Member, User, Guild +from discord import Member from discord.ext import commands, tasks import sizebot.data @@ -75,7 +75,7 @@ async def change(self, ctx: BotContext, *, arg: LimitedRate | Rate | Diff | str) changes.start(userid, guildid, addPerSec=arg.addPerSec, mulPerSec=arg.mulPerSec, stopSV=arg.stopSV, stopTV=arg.stopTV) await ctx.send(f"{ctx.author.display_name} has begun slow-changing at a rate of `{str(arg)}`.") elif arg == "stop": - await ctx.send(**stop_changes(ctx.author, ctx.guild)) + await ctx.send(**stop_changes(ctx.author)) @commands.command( hidden = True @@ -99,7 +99,7 @@ async def changes(self, ctx: BotContext): @commands.guild_only() async def stopchange(self, ctx: BotContext): """Stop a currently active slow change.""" - await ctx.send(**stop_changes(ctx.author, ctx.guild)) + await ctx.send(**stop_changes(ctx.author)) @commands.command( aliases = ["eat"], diff --git a/sizebot/cogs/register.py b/sizebot/cogs/register.py index d2486a2e..a02180bd 100644 --- a/sizebot/cogs/register.py +++ b/sizebot/cogs/register.py @@ -1,6 +1,5 @@ import asyncio import logging -from typing import Annotated import discord from discord.utils import get @@ -10,9 +9,6 @@ from sizebot.lib import errors, userdb, nickmanager from sizebot.lib.constants import ids, emojis from sizebot.lib.types import BotContext -from sizebot.lib.units import SV, WV -from sizebot.lib.stats import AVERAGE_HEIGHT, AVERAGE_WEIGHT -from sizebot.lib.unitsystem import UnitSystem, parse_unitsystem logger = logging.getLogger("sizebot") diff --git a/sizebot/cogs/set.py b/sizebot/cogs/set.py index 8800371e..d7b6596e 100644 --- a/sizebot/cogs/set.py +++ b/sizebot/cogs/set.py @@ -6,7 +6,7 @@ from sizebot.cogs.register import show_next_step from sizebot.lib import userdb, nickmanager -from sizebot.lib.diff import LinearRate, Rate +from sizebot.lib.diff import LinearRate from sizebot.lib.digidecimal import Decimal from sizebot.lib.gender import Gender, parse_gender from sizebot.lib.loglevels import EGG @@ -15,7 +15,7 @@ from sizebot.lib.types import BotContext from sizebot.lib.units import SV, WV, pos_SV, pos_WV from sizebot.lib.unitsystem import UnitSystem, parse_unitsystem -from sizebot.lib.utils import AliasMap, parse_scale, randrange_log +from sizebot.lib.utils import parse_scale, randrange_log logger = logging.getLogger("sizebot") diff --git a/sizebot/cogs/setbase.py b/sizebot/cogs/setbase.py index 0b15b19d..4d14d5b3 100644 --- a/sizebot/cogs/setbase.py +++ b/sizebot/cogs/setbase.py @@ -6,8 +6,7 @@ from sizebot.cogs.register import show_next_step from sizebot.lib import errors, userdb, nickmanager from sizebot.lib.constants import emojis -from sizebot.lib.diff import LinearRate, Rate -from sizebot.lib.digidecimal import Decimal +from sizebot.lib.diff import LinearRate from sizebot.lib.shoesize import to_shoe_size, from_shoe_size from sizebot.lib.stats import HOUR from sizebot.lib.types import BotContext