This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

pestilent-lieutenant

1.3.2 • Public • Published

Pestilent Lieutenant

npm version npm total downloads code size

Receive an embedded message from Discord whenever you save something on Reddit

Installation

npm install pestilent-lieutenant

How to use

Create a Discord webhook

  1. Go to the Discord channel you want to receive Reddit embeds
  2. From the channel menu, select Edit Channel
  3. Click on Integrations on the left menu
  4. Click on Webhooks and then press the Create Webhook button
  5. (Optional) Name the bot to whatever you prefer and set an avatar
  6. Click Copy Webhook URL and save this link for later
Step 1 and 2 Step 3 Step 4 and 5
Discord step 1 and 2 Discord step 3 Discord step 4 and 5

Create a Reddit app

  1. Create a Reddit app. Select "script" and put in any url and uri. It doesn't matter what you put here, as long as they are valid links
  2. Save your client ID and client secret on the dashboard for later
Step 1 Step 2
Reddit step 1 Reddit step 2

Configure config.json

Open config.json from the repository and edit the following fields:

Field What it is Example
discordWebhook.id https://discord.com/api/webhooks/this-part-of-the-url/long-token 199737254929760256
discordWebhook.token https://discord.com/api/webhooks/18-digit-number/this-part-of-the-url 5j-0Uj72BkzYcRt1rL56wVdm7OCIixAAL-nrhLrt41QSw9yDa3jdbT8dFSiRcDjDoeEp
redditAuth.clientId The client ID you saved from earlier p-jcoLKBynTLew
redditAuth.clientSecret The client secret you saved from earlier gko_LXELoV07ZBNUXrvWZfzE3aI
redditAuth.username Your Reddit username Choby9
redditAuth.password Your Reddit password abcd1234!@#$
interval Time interval in milliseconds for how often to check for new saved posts 6000
maxIdleCount Number of requests with no new saved posts before going idle 5
idleInterval Time interval in milliseconds for how often to check for new saved posts when idle 30000
avatar_url (optional) Image url for the webhook avatar. This overwrites the avatar you set from step 5 https://i.redd.it/snoovatar/avatars/ffa9205e-9356-43fd-acb1-12c11c6d4b97.png

Once you're done, you're all set! Now go ahead and start the program with

node .

and enjoy the Reddit posts while I pour this pestilence into your ear...

Readme

Keywords

Package Sidebar

Install

npm i pestilent-lieutenant

Weekly Downloads

2

Version

1.3.2

License

ISC

Unpacked Size

7.03 kB

Total Files

8

Last publish

Collaborators

  • chingchang9