An open API service indexing awesome lists of open source software.

https://github.com/goldenchrysus/rstocksbot

Discord chat bot based on discord.js for the /r/stocks subreddit chat server.
https://github.com/goldenchrysus/rstocksbot

Last synced: about 2 months ago
JSON representation

Discord chat bot based on discord.js for the /r/stocks subreddit chat server.

Awesome Lists containing this project

README

        

# rstocksbot
Discord chat bot based on [discord.js](https://github.com/hydrabolt/discord.js) for the [/r/stocks](https://www.reddit.com/r/stocks/) subreddit [chat server](http://www.r-stocks.com/chat/).

## How to use

### Using git

Clone the git repository and install the package:

```
git clone https://github.com/GoldenChrysus/rstocksbot.git
cd rstocksbot
npm install
```

Start the package:

```
npm start
```

### Using NPM

Install the package via NPM:

```
npm install rstocksbot
```

Navigate to the directory that contains the install:

On Linux, this is usually "~/node_modules/rstocksbot"

On Windows, this is usually "C:/Users/[your\_username]/node_modules/rstocksbot"

```
cd your_installation_directory
```

Start the package:

```
npm start
````

## Dependencies
* [discord.js](https://www.npmjs.com/package/discord.js) - **10.0.1** - used for interfacing with Discord
* [fs](https://www.npmjs.com/package/fs) - **0.0.1-security** - used to write YouTube audio to the local disk for playback
* [node-opus](https://www.npmjs.com/package/node-opus) - **0.2.4** - audio codec for voice
* [opusscript](https://www.npmjs.com/package/opusscript) - **0.0.1** - audio codec for voice
* [request](https://www.npmjs.com/package/request) - **2.69.0** - used to GET/POST to the server handlers and receive the response
* [youtube-dl](https://www.npmjs.com/package/youtube-dl) - **1.11.1** - deprecated
* [ytdl-core](https://www.npmjs.com/package/ytdl-core) - **0.8.1** - used to download YouTube video info and audio
* [electron](https://www.npmjs.com/package/electron) - **1.4.15** - used to pull javascript-generated content from websites

## Commands
__!price _$SYMBOL___ - retrieve latest price info on a stock

__!_$SYMBOL___ - retrieve an overview of a stock

__!chart _$SYMBOL_ [--_CANDLE_SIZE_]__ - display chart for a stock; optional candle sizes are "3m": 3-minute, "5m": 5-minute, "15m": 15-minute, "d": daily, "w": weekly, "m": monthly; e.g. !chart $MSFT --w

__!exthours _$SYMBOL___ - retrieve premarket/after hours price info on a stock where available

__!nexteps _$SYMBOL___ - retrieve the next earnings date for a stock

__!nextdiv _$SYMBOL___ - retrieve the next dividend date for a stock

__!bio _$SYMBOL___ - retrieve a short profile bio about a stock

__!findticker _COMPANY_NAME___ - lookup the ticker for a company

__!define _TERM___ - retrieve definition of a financial term

__!pattern _PATTERN_NAME___ - display image example of a specified pattern

__!historicalreturns__ - quick reference of annualized S&P 500 returns

__!map [-t _TYPE_]__ - display the Finviz daily heatmap; optional types are "sp" (S&P 500), "world", "all", and "etf"; e.g. !map -t etf

__!wiki__ - receive URL of the /r/stocks wiki

__!movies__ - receive a list of great finance movies/documentaries

__!song _YOUTUBE_URL_OR_CODE___ - plays the specified song in the voice channel

Replace $ with / for futures or . for currencies.