This commit is contained in:
insert 2024-12-26 14:44:53 -05:00
parent eae185a05a
commit 2f97f433e4
Signed by: insert
GPG key ID: A70775C389ACF105

View file

@ -54,9 +54,18 @@ class starboard(commands.Cog):
if selfstar == "Yes":
selfstar = True
await self.bot.cur.execute(f"""
INSERT INTO userinfo VALUES
({reaction}, {channel.id}, '{minimumneeded}', '{selfstar}', {interaction.guild_id})
INSERT INTO starsettings VALUES
('{reaction}', {channel.id}, '{minimumneeded}', {selfstar}, {interaction.guild_id})
""")
await interaction.response.send_message("Done!", ephemeral=True)
@starboard.subcommand(
name="Delete",
description="Delete a starboard",
)
async def createstarboard(self, interaction: nextcord.Interaction, channel: nextcord.abc.GuildChannel):
await self.bot.cur.execute(f"DELETE FROM starsettings WHERE starchannel = {channel.id}")
await interaction.response.send_message("Done!", ephemeral=True)
def setup(bot: commands.Bot):
bot.add_cog(starboard(bot))