I am writing a discord bot with using SQLite and discord.py.
This is the command that causes the error:
@bot.command()
@commands.has_permissions(administrator=True)
async def set_ip(ctx, arg=None):
    if arg == None:
        await ctx.send("You must type the IP address next to the command!")
    elif arg.endswith('.aternos.me') == False:
        await ctx.send('IP must end with .aternos.me')
    elif ctx.guild.id == None:
        await ctx.send("This is a guild-only command!")
    else:
        ipas = None
        id = ctx.guild.id
        conn.execute(f'''DROP TABLE IF EXISTS guild_{id}''')
        conn.execute(f'''CREATE TABLE IF NOT EXISTS guild_{id} (
            ip TEXT NOT NULL
        )''')
        conn.execute(f'''INSERT INTO guild_{id} ("ip") VALUES ({arg})''')
        cursor = conn.execute(f'''SELECT ip FROM guild_{id}''')
        for row in cursor:
            ipas = row[0]
        if ipas == None:
            await ctx.send("Failed to set IP!")
            conn.execute(f'''DROP TABLE IF EXISTS guild_{id}''')
        else:
            await ctx.send(f"Your guild ip is now -> {ipas}")
            print("An ip has been set!")
I tried to create a table that if not exist with name of guild_(and the discord server id), and check that it is set or not
Error is:
OperationalError: no such column: (the arg)
SQLite throws this error and I can't figure it out, please help me.
 
     
    