https://i.postimg.cc/bw5Xj8Rd/ping.gif

Introduction

By the end of this tutorial you will have a Discord bot hosted 24/7, for free, forever, on Val Town, that responds to a basic /ping Slash Command.

Val Town is a social website to write, and deploy JavaScript from the browser.

No prior coding experience required. The vast majority of this tutorial is creating the bot on Discord and pasting your keys into Val Town. The actual coding parts are just clicking Run two times to fork over two pieces of code to your Val Town account.

<aside> đź’ˇ If you get stuck, come join us in the Val Town Discord!

</aside>

Video Tutorial

If you prefer videos, here’s this same tutorial in a 3-minute YouTube video.

https://youtu.be/yYXmInPSSfg

Step 1: Create a Discord app

  1. Go to the Discord Developer Portal and select “New Application” in the top right

1.edited.png

  1. Enter a name for your Bot, accept the terms and press Create.

2.png

Step 2: Add the bot to your server

To invite your new bot to your server, you need to generate a link to click on.

  1. Head to the Oauth2 > URL Generator page.
  2. Select the bot scope, then the Send Messages permission.

5.png