@bot.event
async def on_message(ctx):
if ctx.author.id == 956897442199117824:
return
try:
with open(f"levels/{ctx.guild.id} {ctx.author.id} exp.txt", "r") as file:
level = file.read()
except FileNotFoundError:
level = 0
with open(f"levels/{ctx.guild.id} {ctx.author.id} exp.txt", "w") as file:
file.write(int(level) + 1)