• Stars
    star
    214
  • Rank 181,119 (Top 4 %)
  • Language
    TypeScript
  • License
    GNU General Publi...
  • Created about 4 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Amazon price checker, item monitor and stock monitor, all shoved into a Discord bot

AmazonMonitor

Now updated for Discord.js v14 (and typescript)!

https://discord.gg/agQ9mRdHMZ

TODO

Description

AmazonMonitor is a self-hosted Discord bot designed for notifying you, or other people, about price drops and restocks on Amazon. It supports setting price limits, watching items from other countries, watching entire search queries and categories, and more.

FAQ (please read this before creating an issue. Thanks!)

Demo

amazon_demo.mp4

Jump to:

Requirements

  • NodeJS v16 or above
  • Yarn - Run npm install -g yarn
  • A bot user. Ensure it has the "Server Members" and "Message Content" intents enabled in the "Bot" page once it is created.

Configuration

The project comes with an example configuration you can use as a base. To begin configuring the bot:

  1. Copy the config.example.json file.
  2. Rename it to config.json.
  3. Begin editing in your favorite text editor.

It may be hard to know exactly what each option does, and what you can set them to, so they are all outlined below.

prefix

This is the character, or characters, that you will begin every command with. Good examples are $ or !.

token

The token is the login information of the bot. If you don't know how to set up a bot user, refer to this guide.

minutes_per_check

The amount of minutes before each check cycle is run. A good number is around 2 or 3.

search_response_ms

Introduced in !65

Amount of time to pass before the response window expires when running the search command.

url_params

If you want to include a referral code or something, you can use this option to add as many as you want. You'll notice the curly braces; inside of those is where you add each parameter. An example would be something like this:

"url_params":{
  "ref":"my_ref_code",
  "tag":"my_tag"
  etc...
 }

which would produce a link that looks like this:

https://www.amazon.com/dp/B08L5R1CCC/?ref=my_ref_code&tag=my_tag

guild_item_limit

The guild item limit is used to control how many items the bot can keep track of at a time. It's hard to judge what a reasonable number is, so just keep it as low as you can.

cache_limit

A newer addition, the cache limit is the amount of items that will be watched in a category or search query.

required_perms

These are individual permissions, not roles, that a user must have in order to run any of the commands. You can find a reference here.

tld

A TLD, or Top-Level Domain, is the little .com or .ca of a URL. Each regional Amazon site is given a different TLD, so you can set this to your favorite country's TLD and it will grab Amazon results and data from that site. Some examples are:

  • ca - Canada
  • co.uk - UK
  • jp - Japan

* Just as a heads up, if you run the details or watch command on an item listed in a different country, it will not convert it to the correct country.

auto_cart_link

If you're the efficient type, setting this to true will make sure that the links in stock/price notifications will bring you to a page that will automatically add the item to your cart.

debug_enabled

If set to true, the console window will spit out all kinds of information related to what it's doing, in order to give you a better understanding of what's going on in case you're having trouble.

Proxies

To make use of your fancy-dancey proxylist, you simply need to create a file named proxylist.txt in the main bot folder. Each ip/url should be separated by a new line. Each one should be formatted like so: username:password@ip:port. An example of some are listed below in the same format yours should be listed:

http://myuser:[email protected]:12345
http://spikehd:[email protected]:8008
http://amazonuser:[email protected]:2318008
etc...

Starting

To start the bot, simply open a terminal and run these commands:

  • Set directory to bot directory:
    cd "C:/Path/To/Bot/Folder"
  • Install the dependancies (you only have to do this once):
    npm install
  • Run the main file:
    npm run start

To restart the bot after a config change:

  • Press Ctrl+C
  • Start it the same as before:
    npm run start

Commands

Like explained before, commands can only be run with users that have the permissions in the required_perms section of the config. All examples assume a prefix of !, but, again, you can set it to whatever you want.

help

  • Format: help
  • Example: !help

This will give you some details on each command.

search

  • Format: search [query]
  • Example: !search nintendo+switch

Allows you to search for items matching a query, just like on the website. Additional actions are available once the list of items is returned, but you can refer to the information there.

details

  • Format: details [Amazon link]
  • Example: !details https://www.amazon.com/Beats-Studio3-Wireless-Headphones-Collection/dp/B07HYD4VCW/

Spits out details on an item from Amazon. Useful in conjunction with search.

watch

  • Format: watch -l [Amazon link] OR watch -c [Amazon category] OR watch -q [search query].
    • Extra options:
    • -p [price limit] - Sets a price limit for the item. If the price drops below this, it will notify you.
    • -e [price percentage] - Set the difference between the stored price and a new detected price as a percentage before it notifies you. For example, setting this to 25 means the new detected price must be 25% lower than the stored price.
    • -d [difference] - Set the minimum difference between the stored price and a new detected price before it notifies you. Useful for preventing 5-cent differences.
  • Examples:
    • !watch -l https://www.amazon.it/dp/B08C76W2WM/
    • !watch -c https://www.amazon.ca/b/?_encoding=UTF8&node=677244011
    • !watch -q iphone+12
    • !watch -l https://www.amazon.co.jp/-/en/dp/B07D1H7CW3/ -p 6000
    • !watch -q airpods -e 25

Adds an item, category, or search query to the watchlist.

watchlist

  • Format: watchlist
  • Example: !watchlist

View your watchlist as a numbered list. Useful for unwatch.

unwatch

  • Format: unwatch [item position in watchlist]
  • Example: !unwatch 2

Remove an item from your watchlist.

Contributing

Wanna add stuff? Sweet! Issues, PRs, etc. are all welcome!

More Repositories

1

Dorion

Tiny alternative Discord client with a smaller footprint, snappier startup, themes, plugins and more!
Rust
485
star
2

MojoFrontend

Frontend for Mojo Console
JavaScript
27
star
3

CSMLC

Machine learning model trained on CS2, used for detecting the location of players with nothing more than an image of the screen.
Python
16
star
4

shelter-plugins

Shelter plugins, some of them Dorion related
TypeScript
16
star
5

rsRPC

Rust implementation of the Discord RPC server
Rust
12
star
6

SpikeHD.github.io

Wow what an awesome website you should definitely visit it
JavaScript
8
star
7

gm-sysinfo

Cross-platform GameMaker extension for getting system information and resource usage
Rust
8
star
8

reMITM

Dead-simple program that can selectively redirect/proxy traffic from your computer to other places.
Rust
7
star
9

AsciiVert

Convert images and videos to ascii art!
JavaScript
5
star
10

file-metadata

Simple, cross-platform GameMaker lib for getting file metadata
Rust
5
star
11

Flooed

Tiny-ER alternative Discord client with themes, plugins and desktop features, all while using your exising browser installation
Rust
4
star
12

OpenMCPanel

Create, manage, and monitor one, few, or many Minecraft servers using a web-based UI.
TypeScript
3
star
13

nds_pong

Learning homebrew by creating Pong for the NDS
C++
3
star
14

GMBuilder

VSCode extension for building GameMaker games
TypeScript
2
star
15

ubiapi

Uplay/Ubisoft API for Node
JavaScript
2
star
16

RogueTop

Moddable, lightweight PokeRogue Desktop App for Windows, Mac and Linux, built for x86 and ARM.
Rust
2
star
17

DorionPluginsAndThemes

Dorion stuff I have made
JavaScript
2
star
18

WhatsMyDPS

DPS meter mod for "The Binding of Isaac"
Lua
2
star
19

Titune

πŸ“» Entirely client-side, fully time & song synced for everyone, radio website.
TypeScript
2
star
20

goombot

JavaScript
1
star
21

SquidTerm

Squid Game on the terminal
JavaScript
1
star
22

TwitchPlaysAnything

A twitch-plays style program with extended functionality allowing for usage in almost anything
JavaScript
1
star
23

SpikeHD

1
star
24

MenuRecreations

Menu recreations from various video games
JavaScript
1
star
25

Pawny

"Modded" Chess.com client.
JavaScript
1
star
26

Procchi

Stupid simple, in-memory system monitoring, accessible from the web
TypeScript
1
star
27

gamebanana

Game Banana API wrapper for NodeJS
JavaScript
1
star