Hello I hosted my discord.py bot on heroku and its working as expected. The poblem is that I have sqlite3 file in my github repo and its able to read the data. but I am not able to write to it.
below is my code to add data to the file.
async def itemadd(ctx, name, item):
if ctx.message.author.guild_permissions.administrator:
table ="CREATE TABLE IF NOT EXISTS {}(CODE VARCHAR(255))".format(name.title())
cursor.execute(table)
cursor.execute("INSERT INTO {} VALUES (?)".format(name.title()), (item,))
db.commit()
else:
embed = discord.Embed(title="You do not have administrator permission to use this command", description=ctx.author.mention, color=0xff5555)
await ctx.send(embed=embed)
Thanks in advance :)