1.0.9 • Published 3 years ago

redcord v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

node-redcord

CodeFactor

This is a rewrite of redcord in NodeJS - it's mainly for my own amusement and learning. However, with that said, it could be the primary version of redcord in the future as I believe the eris library is much more efficient to use from a development standpoint, but also in speed.

Commands:

-random [subreddit]

This command, when sent into a sever with redcord present, triggers the bot to send a media URL from a random post on the subreddit entered with the command. The only other outputs are either a link to a comment (which is the case when the random post received does not contain a media URL), or null when the subreddit requested does not exist.

-spam [subreddit]

This command uses the same function as -random on the backend, with it being repeated 10 times, sending 10 pieces of media to the server at once from the subreddit given.

Installation:

After installing NodeJS and it's packagaer manager npm, run this to install redcord:

npm install -g redcord

You can now run it directly from the terminal with the redcord command.

How to Use

The only setup required for this is to create a Discord Bot (instructions here) and then setting the Bot's token as an environmental variable called DISCORD_TOKEN (this is done on Linux with the command export DISCORD_TOKEN=[BOT_TOKEN_HERE]).

From there, just run redcord from the command line.

Troubleshooting

The only problems I have really come across with this is setting the environmental variable correctly. Try to confirm that your Bot Token is set as a variable called DISCORD_TOKEN. If there are any issues you come across, please contact me at sethaflynn@gmail.com

For Developers:

Getting the Source Code

You can clone the repository using the following command:

git clone https://github.com/getchoo/node-redcord.git

or, you can just download a tarball/zip from the releases page.

Setup

In order to run the current codebase - as well as any modifications you make - you first need to run this command to install dependencies:

npm install

Code Cleanup

Before attempting to create a pull request, please run npm run fix. This script will run the standards linter/formatter. I like to keep my codebases neat and compliant with standards such as these and expect contributors to do the same.

Run the Project

You can run the project with the following command:

npm start

Thanks

Here are a list of projects and developers that make node-redcord possible:

  • @abalabahaha for creating eris, the library that powers the Discord part of node-redcord.
  • @maikdevries and his lunar bot for giving me an idea as to how I should structure the source code of the project.
  • The Pancake Discord bot that introduced me to the eris library and inspired me to attempt writing one in NodeJS.
1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.2-0

3 years ago

1.0.1-0

3 years ago

1.0.0

3 years ago