Your variable names are extremely confusing, this makes it difficult to understand what you were going for. ![]() The error message is occurring because you are referencing a author_id which isn't set.Here's the error I keep getting Bot is Readyįile "C:\Users\12488\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 333, in _run_evenįile "C:\Users\12488\Downloads\Bot\antispam.py", line 31, in on_message Very new to discord bots and python in general and building an antispam bot, here's my code: import discordī = commands.Bot(command_prefix='not a def on_ready():īasically on every message it gets every users discord id and then assigns a value to it, default is 1 since the user just sent a message, where the while loop starts is a timer, every 5 seconds it resets and if the user who's sent the message has sent 5 messages, it tells them to stop spamming, I don't know why I'm getting errors, also since I'm new to python is I could make any code simpler it would be much appreciated if you could let me know.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |