From 511b1755ab8ebc7e61843cb5c194d0ba583c2c73 Mon Sep 17 00:00:00 2001 From: niggasinparis Date: Wed, 1 Feb 2023 20:53:13 +0530 Subject: [PATCH] mod=0 is default Remove subreddit references --- README | 1 + reddit.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README b/README index 12c5e31..39474a9 100644 --- a/README +++ b/README @@ -8,6 +8,7 @@ Steps: Copy the app key (below name) and replace with the key Copy the app secret and replace with the secret Replace and with your bot's credentials + Replace with subreddit name Workaround for spam filter: Add your bot to your subreddit as a mod with perms to manage posts diff --git a/reddit.py b/reddit.py index 674e0e7..c408541 100644 --- a/reddit.py +++ b/reddit.py @@ -1,7 +1,8 @@ import requests, json from time import sleep -mod = 1 +mod = 0 +sr = ' headers = {'User-Agent': 'Wowbot/1.0.0'} key = '' secret = '' @@ -25,7 +26,7 @@ def fix_token(): headers["Authorization"] = f'bearer {token}' def reddit_post(title, url): - data = {"api_type": 'json', "kind": 'image', "url": url, "title": title, "sr": 'bottest200000'} + data = {"api_type": 'json', "kind": 'image', "url": url, "title": title, "sr": sr} request = {"headers": headers, "data": data} response = requests.post('https://oauth.reddit.com/api/submit', **request)