aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/cogs/reddit.py4
-rw-r--r--docker-compose.yml2
2 files changed, 4 insertions, 2 deletions
diff --git a/bot/cogs/reddit.py b/bot/cogs/reddit.py
index 7b183221c..76da0f09f 100644
--- a/bot/cogs/reddit.py
+++ b/bot/cogs/reddit.py
@@ -25,7 +25,7 @@ class Reddit(Cog):
# including the target platform, a unique application identifier, a version string,
# and your username as contact information, in the following format:
# <platform>:<app ID>:<version string> (by /u/<reddit username>)
- USER_AGENT = "docker:Discord Bot of https://pythondiscord.com/:v?.?.? (by /u/PythonDiscord)"
+ USER_AGENT = "docker-python3:Discord Bot of PythonDiscord (https://pythondiscord.com/):v?.?.? (by /u/PythonDiscord)"
URL = "https://www.reddit.com"
OAUTH_URL = "https://oauth.reddit.com"
MAX_FETCH_RETRIES = 3
@@ -117,7 +117,7 @@ class Reddit(Cog):
content = await response.json()
posts = content["data"]["children"]
return posts[:amount]
-
+
await asyncio.sleep(3)
log.debug(f"Invalid response from: {url} - status code {response.status}, mimetype {response.content_type}")
diff --git a/docker-compose.yml b/docker-compose.yml
index f79fdba58..7281c7953 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -42,3 +42,5 @@ services:
environment:
BOT_TOKEN: ${BOT_TOKEN}
BOT_API_KEY: badbot13m0n8f570f942013fc818f234916ca531
+ REDDIT_CLIENT_ID: ${REDDIT_CLIENT_ID}
+ REDDIT_SECRET: ${REDDIT_SECRET}