Update
This commit is contained in:
parent
f5ce98ed6d
commit
14981e265a
3 changed files with 7 additions and 3 deletions
|
@ -22,7 +22,7 @@ class GameView(nextcord.ui.View):
|
||||||
found = False
|
found = False
|
||||||
for i in range(len(ogmsg)):
|
for i in range(len(ogmsg)):
|
||||||
if ogmsg[i].startswith("~"):
|
if ogmsg[i].startswith("~"):
|
||||||
message = message + i + "\n"
|
message = message + ogmsg[i] + "\n"
|
||||||
continue
|
continue
|
||||||
if not found:
|
if not found:
|
||||||
newmsg = "~~" + ogmsg[i] + "~~"
|
newmsg = "~~" + ogmsg[i] + "~~"
|
||||||
|
|
|
@ -10,6 +10,8 @@ import os
|
||||||
class RoleView(nextcord.ui.View):
|
class RoleView(nextcord.ui.View):
|
||||||
def __init__(self,bot):
|
def __init__(self,bot):
|
||||||
super().__init__(timeout=None)
|
super().__init__(timeout=None)
|
||||||
|
if bot == None:
|
||||||
|
return
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
|
|
||||||
#res = await self.bot.cur.execute(f"SELECT roleid FROM rolebutton WHERE serverid = {self.bot.roleguild.id}")
|
#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):
|
def __init__(self, bot: commands.Bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
bot.add_view(RoleView(bot))
|
bot.add_view(RoleView(None))
|
||||||
|
|
||||||
@nextcord.slash_command(
|
@nextcord.slash_command(
|
||||||
name="rolebuttons",
|
name="rolebuttons",
|
||||||
|
|
|
@ -12,6 +12,8 @@ import os
|
||||||
class ApplicationView(nextcord.ui.View):
|
class ApplicationView(nextcord.ui.View):
|
||||||
def __init__(self,bot):
|
def __init__(self,bot):
|
||||||
super().__init__(timeout=None)
|
super().__init__(timeout=None)
|
||||||
|
if bot == None:
|
||||||
|
return
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
|
|
||||||
@nextcord.ui.button(
|
@nextcord.ui.button(
|
||||||
|
@ -115,7 +117,7 @@ class speechbubble(commands.Cog):
|
||||||
|
|
||||||
def __init__(self, bot: commands.Bot):
|
def __init__(self, bot: commands.Bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
bot.add_view(ApplicationView(bot))
|
bot.add_view(ApplicationView(None))
|
||||||
|
|
||||||
@commands.Cog.listener('on_message')
|
@commands.Cog.listener('on_message')
|
||||||
async def on_message(self,message):
|
async def on_message(self,message):
|
||||||
|
|
Loading…
Reference in a new issue