its giving an error in @bot.event
First of all you have variable
line 4 and you are
using bot. So make sure you correct that.
Secondly and most importantly, make sure your token is not visible to anyone. If anyone has your token they can control you bot. So put your token in env. You will see a lock on left side. Add your token there and then use it in file.