From 14981e265a476d7a7b32d75c4f3f916f230d349c Mon Sep 17 00:00:00 2001 From: insert Date: Sat, 10 Aug 2024 15:06:57 -0400 Subject: [PATCH] Update --- gameutils.py | 2 +- rolebuttons.py | 4 +++- speechbubble.py | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gameutils.py b/gameutils.py index ceba778..4d74e69 100644 --- a/gameutils.py +++ b/gameutils.py @@ -22,7 +22,7 @@ class GameView(nextcord.ui.View): found = False for i in range(len(ogmsg)): if ogmsg[i].startswith("~"): - message = message + i + "\n" + message = message + ogmsg[i] + "\n" continue if not found: newmsg = "~~" + ogmsg[i] + "~~" diff --git a/rolebuttons.py b/rolebuttons.py index 717352a..5568bac 100644 --- a/rolebuttons.py +++ b/rolebuttons.py @@ -10,6 +10,8 @@ import os class RoleView(nextcord.ui.View): def __init__(self,bot): super().__init__(timeout=None) + if bot == None: + return self.bot = bot #res = await self.bot.cur.execute(f"SELECT roleid FROM rolebutton WHERE serverid = {self.bot.roleguild.id}") @@ -36,7 +38,7 @@ class rolebutton(commands.Cog): def __init__(self, bot: commands.Bot): self.bot = bot - bot.add_view(RoleView(bot)) + bot.add_view(RoleView(None)) @nextcord.slash_command( name="rolebuttons", diff --git a/speechbubble.py b/speechbubble.py index a33c095..39bedf6 100644 --- a/speechbubble.py +++ b/speechbubble.py @@ -12,6 +12,8 @@ import os class ApplicationView(nextcord.ui.View): def __init__(self,bot): super().__init__(timeout=None) + if bot == None: + return self.bot = bot @nextcord.ui.button( @@ -115,7 +117,7 @@ class speechbubble(commands.Cog): def __init__(self, bot: commands.Bot): self.bot = bot - bot.add_view(ApplicationView(bot)) + bot.add_view(ApplicationView(None)) @commands.Cog.listener('on_message') async def on_message(self,message):