A lightweight checkout link builder given product(s) link. Supports direct integration into Discord.
(On Windows I like to use the Linux Terminal Emulator Cmder)
git clone https://github.com/walmat/link-builder.git
cd link-builder
npm install
(ornpm i
for all you shortcut junkies)
If you don't already have Node
installed, head here and install the stable copy for your OS.
If you don't already have a custom bot setup for your server, navigate here. You should see a similar screen as below once you're logged in.
If you don't already have a bot, click New App
. You should be redirected to the screen below.
<img src"_assets/git-pics/1.png" />
On this screen, go ahead and give your bot a name (description and picture are optional, and can be changed later if you decide you want to add either). Click Create App
to continue.
You'll see the screen above once your App has been created
. Here we'll need to do a couple things. First things first,
copy the Client ID
under App Details
, open up a new tab, and navigate to https://discordapp.com/oauth2/authorize?client_id=YOUR_CLIENT_ID_HERE&scope=bot
making sure to replace YOUR_CLIENT_ID_HERE
with the Client ID of your new application. (e.g. – for my application,
the url looks like this: https://discordapp.com/oauth2/authorize?client_id=451028967781040129&scope=bot
).
Select the server you want to add the bot to, and click Authorize
. You can close that page now. Let's head back to the
tab where we're setting up our bot. Scroll to the bottom of the page, and you should see the below screen.
Click on the button Create a Bot User
and Yes, do it!
.
Refer to the above screenshot, but we're almost done setting up the pre-requisites. Check the box next to Public Bot
,
and click to reveal your token
. Keep this safe and don't share it with anyone!!
With that token, navigate to the project directory and open config.json
in whatever text editor you prefer (I use sublime).
Paste that token over the PASTE_YOUR_TOKEN_HERE
. Save and close that file.
Once you have the config.json
file finished, and if you're navigated into the link-builder
folder already, simply
run node index.js
. This will start the bot for you.
If you want to further develop this project, please give credit where credit is due.
You can choose to setup a given channel for this, but I won't go into all that babysitting here. To run the link builder,
simple type: $build <link to product>
For example, this will build the checkout links for NIKE X ACRONYM AIR VAPORMAX FK MOC 2
$build https://kith.com/collections/footwear/products/nkaq0996-102
. You can use as many links chained (separated by a space of course) to one $build
command too!
(e.g. – $build https://kith.com/collections/footwear/products/nkaq0996-102 https://kith.com/collections/footwear/products/nkaq0996-102 https://kith.com/collections/footwear/products/nkaq0996-102
)
Matthew Wall - @walmat#5572
This project is licensed under the GNU GENERAL PUBLIC License - see the LICENSE file for details