# Path: suggestionbox/checks.py
# def has_active_box():
#     async def check(ctx: commands.Context):
#         if not ctx.guild:
#             return False
#         cog = ctx.bot.get_cog("SuggestionBox")
#         if TYPE_CHECKING:
#             from .core import SuggestionBox
# 
#             assert isinstance(cog, SuggestionBox)  # nosec
#         if not cog:
#             return False
#         return bool(await cog.config.guild(ctx.guild).boxes())
# 
#     return commands.check(check)


from typing import Literal, Optional
from redbot.core import checks, commands
from redbot.core.config import Config
from redbot.core.utils import AsyncIter
from redbot.core.utils.antispam import AntiSpam
from .checks import has_active_box
import discord
    @sset.command(name="addreactions")
    async def sset_adds_reactions(self, ctx, option: Optional[bool] = None):
        """
        sets whether to add reactions to each suggestion

        displays current setting without a provided option.

        off = Don't use reactions
        on = Use reactions
        """
        if option is None:
            current = await self.config.guild(ctx.guild).add_reactions()
            command = command = f"`{ctx.clean_prefix}help suggestionset addreactions`"
            if current:
                base = (
                    "I am adding reactions to suggestions."
                    f"\nUse {command} for more information"
                )
            else:
                base = (
                    "I am not adding reactions to suggestions."
                    f"\nUse {command} for more information"
                )

            await ctx.send(base)
            return

        await self.config.guild(ctx.guild).add_reactions.set(option)
        await ctx.tick()


# Path: suggestionbox/checks.py
# def has_active_box():
#     async def check(ctx: commands.Context):
#         if not ctx.guild:
#             return False
#         cog = ctx.bot.get_cog("SuggestionBox")
#         if TYPE_CHECKING:
#             from .core import SuggestionBox
# 
#             assert isinstance(cog, SuggestionBox)  # nosec
#         if not cog:
#             return False
#         return bool(await cog.config.guild(ctx.guild).boxes())
# 
#     return commands.check(check)


# Path: suggestionbox/core.py
from typing import Literal, Optional
from redbot.core import checks, commands
from redbot.core.config import Config
from redbot.core.utils import AsyncIter
from redbot.core.utils.antispam import AntiSpam
from .checks import has_active_box
import discord

    @sset.command(name="addreactions")
    async def sset_adds_reactions(self, ctx, option: Optional[bool] = None):
        """
        sets whether to add reactions to each suggestion

        displays current setting without a provided option.

        off = Don't use reactions
        on = Use reactions
        """
        if option is None:
            current = await self.config.guild(ctx.guild).add_reactions()
            command = command = f"`{ctx.clean_prefix}help suggestionset addreactions`"
            if current:
                base = (
                    "I am adding reactions to suggestions."
                    f"\nUse {command} for more information"
                )
            else:
                base = (
                    "I am not adding reactions to suggestions."
                    f"\nUse {command} for more information"
                )

            await ctx.send(base)
            return

        await self.config.guild(ctx.guild).add_reactions.set(option)
        await ctx.tick()


    @has_active_box()