Part 2 of a series on making a user-programmable (users can create custom commands for it) Discord bot. In this series, I will walk through the steps of creating a Discord bot along with a custom language that can be interpreted by your bot, so that users of the bot will be able to program their own custom commands.
In this episode of the series, I install Ohm (https://github.com/harc/ohm) using NPM (just like installing Discord.JS), and then create some new files for the project. In one file I start defining the grammar and syntax of our language, and the second file holds the basics for interpreting our code and running the program. Again, helpful links to resources are below.
This series will use Node.JS (programming language), NPM (package manager), Discord.JS (discord interface library), and Ohm (language parser/interpreter). You will also need a text editor (I will be using Atom) and some basic knowledge of the terminal/command line. If you don't have these programs or don't know how to install them yourself, I would check out these links:
https://nodejs.org/en/download/ (Node.JS)
https://www.npmjs.com/get-npm (NPM)
https://atom.io/ (Atom)
https://www.learnenough.com/command-l... (Command Line/Terminal Basics)
I go over these a bit more in the first episode, so if you are starting with a video in the middle of the series, you should at least watch the first video for information on our dependencies.
Other References:
https://lodash.com/docs/4.17.10 (Lodash documentation)
https://discord.js.org/#/ (Discord.JS)
https://github.com/harc/ohm (Ohm)
https://discordapp.com/ (Discord)
https://discordapp.com/developers/ (Discord Developers Dashboard)
I don’t want to beg for subscribers, but if you found the video useful, please share it with anyone who might be interested in it, and subscribe if you want to see more videos like this one. Also, feedback is appreciated - dislike if you hated it, like if you liked it, or leave a comment with suggestions and questions. Thanks for watching, and I’ll see you in the next video.
Disclaimer: Discord is its own company, product, and platform; I do not develop or maintain Discord, and I don't claim to represent them either.