Skip to content

Instantly share code, notes, and snippets.

@MrThista
MrThista / reddit-feed.py
Last active Mar 31, 2021 — forked from danwalkeruk/reddit-feed.py
Script to post new subreddit posts to a Discord channel via webhook
View reddit-feed.py
# Loops through a 2d array like: (1. Subredit name 2. Discord webhook link 3. Type: Hot | New | Top | Rising) and performs the actions to post the posts to the webhooked discord server. also changed the 1second wait to 2 seconds as i was still seeing the web request error.
import requests
import json
import time
from discord_webhook import DiscordWebhook, DiscordEmbed
i = 0
def right(value, count):