The sketch, set in a cafe, has a waitress reading out a menu where every item but one includes the Spam canned luncheon meat.
#ANTI SPAM BOT FOR DISCORD SERIES#
The term spam is derived from the 1970 "Spam" sketch of the BBC sketch comedy television series Monty Python's Flying Circus. Spam is included in almost every dish to the consternation of a customer. Menu from Monty Python’s " Spam" sketch, from where the term is derived. Ī person who creates spam is called a spammer. Spamming has been the subject of legislation in many jurisdictions. The costs, such as lost productivity and fraud, are borne by the public and by Internet service providers, which have added extra capacity to cope with the volume. Spamming remains economically viable because advertisers have no operating costs beyond the management of their mailing lists, servers, infrastructures, IP ranges, and domain names, and it is difficult to hold senders accountable for their mass mailings.
It is named after Spam, a luncheon meat, by way of a Monty Python sketch about a restaurant that has Spam in almost every dish in which vikings annoyingly sing "Spam" repeatedly. While the most widely recognized form of spam is email spam, the term is applied to similar abuses in other media: instant messaging spam, Usenet newsgroup spam, Web search engine spam, spam in blogs, wiki spam, online classified ads spam, mobile phone messaging spam, Internet forum spam, junk fax transmissions, social spam, spam mobile apps, television advertising and file sharing spam. Spamming is the use of messaging systems to send multiple unsolicited messages ( spam) to large numbers of recipients for the purpose of commercial advertising, for the purpose of non-commercial proselytizing, for any prohibited purpose (especially the fraudulent purpose of phishing), or simply sending the same message over and over to the same user.
#ANTI SPAM BOT FOR DISCORD CODE#
I am not sure why there is a sleep loop at the bottom.Īnyway, I think the following code will do what you'd like it to. I think there is an issue with your logic.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.