Added spamfilter and fixed a bug

tested for days and it works well, but it's affected by the bot on and off commands just in case.