Skip to content
reddit bot that looks for comments with song names and responds with their respective SoundCloud links.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
trapbot
.gitignore
LICENSE.md
README.md
requirements.txt

README.md

Note: This project has been put on hiatus due to the SoundCloud API returning incorrect search results.

TrapBot

A reddit bot that looks for comments with song names and responds with their respective SoundCloud links.

Usage

Type each song on a separate line with the song name and artist (order is irrelevant) separated by spaces and a dash. This bot will only scan the comments posted in the subreddits listed in subreddits.txt.

Example:

* Helix - Flume
* Core - RL Grime
* U Already Know - Keys N Krates

Note: This bot is still in beta. If you find any errors, please respond to the bot's comment or PM it with the post and type of error. I will be sure to edit the post and try to prevent those errors from reoccuring in the future.

Installation

Requirements:

  • Python 3
  • virtualenv
  1. Make a new working directory for the virtual environment.
    python -m venv trapbot
    
  2. cd into the new directory, and activate the virtual environment.
    cd trapbot
    source bin/activate
    
  3. Clone the repository.
    git clone https://github.com/Kevin-Mok/TrapBot src
    
  4. Install the necessary packages.
    cd src
    pip install -r requirements.txt
    
  5. Create a reddit app with a redirect uri of https://127.0.0.1/. Then, create praw.ini with the following information:
    [trapbot]
    client_id=     # below app name
    client_secret=
    password=
    username=
    user_agent=TrapBot user agent
    
  6. Create soundcloud-api.ini with your SoundCloud API key as the only line in the file.
  7. Run main.py.

Motivation

This bot was inspired by various music discussion threads (namely in r/trap) where lists of songs would be posted with no accompanying SoundCloud links.

Built With

You can’t perform that action at this time.