Look, the issue seems to be directly related to the token, it's about the bot's token. You know, the error "401 Unauthorized" and the message "Improper token has been passed" indicate that the token you're using is either incorrect or invalid.
So, I suggest you check the token, and if possible, try renewing the token in the Discord Developer Portal. Also, verify the permissions you've given to the bot, both in the Discord Developer Portal and within the code.