From c1deba0fa9a74e7e2d3c8fd7ce7f72f9a6862ace Mon Sep 17 00:00:00 2001 From: Syunngiku0402 <86222854+Syunngiku0402@users.noreply.github.com> Date: Fri, 3 Jan 2025 01:13:09 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=97=E3=83=AC=E3=82=BC=E3=83=B3=E3=83=88?= =?UTF-8?q?=E4=BC=81=E7=94=BB=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=89=E5=AE=9F?= =?UTF-8?q?=E8=A3=85v5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cogs/cpresent.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cogs/cpresent.py b/cogs/cpresent.py index fe59a6d..8f140aa 100644 --- a/cogs/cpresent.py +++ b/cogs/cpresent.py @@ -10,8 +10,9 @@ class LOttery(discord.ui.View): # 抽選コマンド - def __init__(self): + def __init__(self, bot: commands.Bot): super().__init__(timeout=None) + self.bot = bot @discord.ui.button(label="応募", style=ButtonStyle.green, emoji="✅", custom_id="present") async def pressedLotteryButton(self, interaction: discord.Interaction, button: discord.ui.button): @@ -106,4 +107,4 @@ async def cmisc( async def setup(bot: commands.Bot): await bot.add_cog(CPresent(bot)) - bot.add_view(LOttery()) + bot.add_view(LOttery(bot))