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):