Skip to content

Instantly share code, notes, and snippets.

@redthista
redthista / reddit-feed.py
Last active January 13, 2023 15:44 — forked from danwalkeruk/reddit-feed.py
Script to post new subreddit posts to a Discord channel via webhook
# 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):