Skip to content

A Reddit bot designed to select winners from top level comments in a post

Notifications You must be signed in to change notification settings

ZX-80/Contest-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Contest Bot

badge badge badge

A Reddit bot designed to randomly select the winners of a competition from top level comments in a post

Getting startedProject Files DescriptionInstall Instructions

Getting Started

To randomly select winners from a particular post, you:

  1. enter the amount of winners you want (defaults to 1)
  2. copy the URL of the post you are running the contest from
  3. click Paste URL, which will pull the post URL from the clipboard, and randomly select winners

The selected winners will then be displayed in the text box. It shows up to a maximum of 10 before scrolling is required.

Project Files Description

  • 📁 Excel Contest Records: A directory containing contest results in a csv format
    • 📄 Contest_??????.csv: The contest results for the post with ID ??????
  • 📁 Logs: contains up to 2 MB of program logs. This is used for debugging when an issue occurs
  • 📄 account.ini: Contains the user account information, which is required to access the Reddit API, and a user configurable list of blacklisted usernames
  • 📄 contest_bot.pyw: The main script the user should run

Install Instructions

This script was developed and tested on Windows, but likely works on other operating systems. The python version installed was python 3.10.0. Installation for newer version of python 3 should look similar.

1. Install Python 3

  • Download and install the latest version of Python3 from Python Downloads Page, making sure to follow the below instructions during installation.

    • In the optional features menu, select "pip", "tcl/tk", "py launcher", and "for all users".
    • In the advanced options menu: select "Create shortcuts", "Add Python to environment variables", and "Precompile standard library"

    image

  • Check that Python 3 is properly installed

    • First open a command prompt (cmd.exe), then run python. If it doesn't produce an error and looks similar to the example, then Python 3 is installed. Type quit() to exit Python 3
    • In the same command prompt, run pip -V (capital V), or python -m pip -V. If it doesn't produce an error and looks similar to the example, then Pip is installed

    image

2. Install PRAW

  • Open a command prompt, then run pip install praw, or python -m pip install praw
    • You should see an lot of output with the final line looking something like Successfully installed praw-7.5.0 prawcore-2.3.0 update-checker-0.18.0

3. Install the script

  • Create a folder where you'd like the script to live
  • Download the script files from github by clicking Code and then Download Zip as shown below
  • Unzip the files in Contest-Bot-main.zip into the folder you created

image

4. Complete account.ini

About

A Reddit bot designed to select winners from top level comments in a post

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages