PROGRAMM
@client.event
async def on_message(message):
my_file = open("{0}.txt".format(message.author.id), "w")
myfile1 = open("{0}.txt".format(message.author.id), "r")
myfile1.read()
my_file.write(myfile1.read() ++ number)
my_file.close()
ERROR
Ignoring exception in on_message
Traceback (most recent call last):
File "C:\Users\senuk\AppData\Local\Programs\Python\Python35\lib\site-
packages\discord\client.py", line 307, in _run_event
yield from getattr(self, event)(*args, **kwargs)
File "overmind.py", line 821, in on_message
my_file.write(myfile1.read() ++ number)
number = 1
I'm trying to read the number of messages, which would then display them in the statistics about the user, but do not understand what the error and how to fix it, maybe someone knows?