Pycord - sqlite3 - Parameters are of unsupported type

32 views Asked by At

I am working on a discord bot using pycord, and sqlite as my DB. Im trying to make a setup command for my ticket system, which would add the guild id to a db, so I can use it within another cog.

class ticketsetup(commands.Cog):
    def __init__(self, client):
        self.client = client
        
    
    tickets1 = discord.SlashCommandGroup("tickets", "ticket commands.")

    @tickets1.command()
    async def setupmenu(self, ctx):
        conn = sqlite3.connect('setup.sqlite')
        cur = conn.cursor()
        cur.execute("INSERT INTO setup (guild_id) VALUES (?)", (ctx.guild.id))

I tried ctx.guild.id, and discord.Guild.id, which both gave the unsupported parameters error.

0

There are 0 answers