From 347f001993eb797c3cf84e517831e1892b82154a Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Thu, 6 Apr 2017 02:48:01 +0000 Subject: [PATCH] More rate limit fixes --- titanembeds/blueprints/api/api.py | 2 +- titanembeds/static/js/embed.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/titanembeds/blueprints/api/api.py b/titanembeds/blueprints/api/api.py index 7b04326..c8dea53 100644 --- a/titanembeds/blueprints/api/api.py +++ b/titanembeds/blueprints/api/api.py @@ -159,7 +159,7 @@ def get_online_embed_users(guild_id): @api.route("/fetch", methods=["GET"]) @valid_session_required(api=True) -@rate_limiter.limit("1 per 5 second", key_func = channel_ratelimit_key) +@rate_limiter.limit("1 per 2 second", key_func = channel_ratelimit_key) def fetch(): guild_id = request.args.get("guild_id") channel_id = request.args.get('channel_id') diff --git a/titanembeds/static/js/embed.js b/titanembeds/static/js/embed.js index 0463d05..b707bb4 100644 --- a/titanembeds/static/js/embed.js +++ b/titanembeds/static/js/embed.js @@ -360,7 +360,7 @@ $("#messagebox").keyup(function(event){ }); funct.catch(function(data) { if (data.status == 429) { - Materialize.toast('You are sending messages too fast! 1 msg / 5 secs', 10000); + Materialize.toast('You are sending messages too fast! 1 message per 10 seconds', 10000); } }); }