aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2017-11-27 13:34:20 +0100
committerRahiel Kasim <rahielkasim@gmail.com>2017-11-27 13:34:20 +0100
commitc58cdbaf2cfcc1f9d76111a34fa056c5fd5bd96b (patch)
tree101ab15f7275d323427462f64db7c89584168176
parentfb1723b61b79ae800d86dd0a4cd5fcc3b982ba5a (diff)
use ujson as json encoder/decoderHEADmaster
-rw-r--r--main.py3
-rw-r--r--requirements.txt1
2 files changed, 3 insertions, 1 deletions
diff --git a/main.py b/main.py
index 9c18358..2b2add5 100644
--- a/main.py
+++ b/main.py
@@ -18,6 +18,7 @@ import signal
from time import time
import aioredis
+import ujson as json
import uvloop
from aiotg import Bot, Chat
from bismillahbot import Quran, make_index
@@ -25,7 +26,7 @@ from bismillahbot import Quran, make_index
from secret import token
-bot = Bot(api_token=token)
+bot = Bot(api_token=token, json_serialize=json.dumps, json_deserialize=json.loads)
quran_index = make_index()
redis = None
redis_namespace = "aqb:"
diff --git a/requirements.txt b/requirements.txt
index f70474a..b2b22b4 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,5 @@
aioredis
aiotg
hiredis
+ujson
uvloop