from discord import Guild from discord.ext import commands from storage import Storage class BaseCog(commands.Cog): def __init__(self, bot): self.bot = bot def save_setting(guild: Guild, name: str, value): state: dict = Storage.state_for_guild(guild) state[name] = value Storage.save_guild_state(guild) def warn(guild: Guild): state: dict = Storage.state_for_guild(guild)