Skip to content

tokc/guardian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

guardian

Simplistic anti-flooding mechanism for limiting chatbot responses, etc..

Use

anti_flood = guardian.Guardian()

if anti_flood.is_flooding(username, OPTIONAL_FLOOD_LIMIT_INTEGER):
    reply = "You are sending too many requests too quickly."
else:
    reply = "Here is the response you requested."
slow_chat = guardian_fixed_time.Guardian()

if slow_chat.can_message(username):
    reply = "Here is the response you requested."
else:
    reply = "Wait a little longer before making a request."

About

Simplistic anti-flooding mechanism for limiting chatbot responses, etc..

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages