Я запускаю код, и он дает мне кучу ошибок, таких как «invalid_grant error processing request».В моем действительном коде мои идентификаторы и пароли установлены правильно.Что я делаю не так?
import random
import praw
jokes = open('jokelist.txt').read().splitlines()
joke = ''
#Sets up base of bot
reddit = praw.Reddit(client_id='',
client_secret = '',
username = 'JokeMeBot',
password = '',
user_agent = 'JokeMeBot by /u/Tawkins')
#sets the subreddit
subreddit = reddit.subreddit('dadjokes')
#how to call the bot
keyword = '!JokeMe'
#Checks if the keyword is in the subreddit
for comment in subreddit.stream.comments():
if keyword in comment.body:
#sets to a random joke and posts
joke = random.choice(jokes)
comment.reply(joke)
print('posted')
else:
print("oops")