The Twenty Percent

Discord Bot

Making a Discord Bot

I want to set up a Discord Bot that can receive sensor data from an Arduino with WiFi. The Arduino is in the mail, so I’m going to focus on the Discord Bot this week.

Ideally:

  • The Arduino can use an API to transmit sensor data.
  • The Bot can show graphs on a discord channel, following user prompts
  • I can host the bot on a local machine.

I’m going to start here.

The Getting Started guide is fantastic. It has taken me through

  1. Making an Application on discord
  2. Setting up the repository for the bot, with some good recommendations on Node.js
  3. Authorizing the bot with the Discord server.
  4. Handling commands. I need to work out which commands we need for operations here. It would be sweet to see live sensor data, or at least periodic summaries.

Here are the docs for Discord.js. NB! Servers are called Guild.