Skip to main content

Esports in the CTE Classroom: Discord Bot Development

(Image credit: Unsplash: Jeshoots)

The esports industry provides myriad opportunities for career and technical education due to its wide range of available career pathways (opens in new tab). One obvious program choice is computer science; after all, without developers to create the games, there would be no esports to play. However, there are other ways programmers are needed in esports, including the development of custom Discord bots.

Bots are not unique to Discord. They have business functions in any industry that benefits from automation of simple, repetitive tasks. For example, a banking application might need to listen for a user to add a document that sets off a chain of events requiring input and approval from many departments. A medical chatbot might be used to triage the symptoms of a patient before directing them to the appropriate personnel for their needs. Learning the basics of bot development will provide students with a job skill they can take into any future role.

Bot development also covers several bases for computer science standards such as the CSTA K-12 CS Standards (opens in new tab). A bot is a perfect way to learn and implement the steps of the software development life cycle; employing Discord as the vehicle is an easy way to get a student’s peers using and reviewing their bot’s functionality for ongoing development. Additionally, many bots will require some form of data management and will also provide opportunity for conversations on security from the very first time the student copies their bot token to paste into their code. As with any socially-minded project, students will be presented with the ethical and cultural impacts of their work.

Getting Started

Despite all of the reasons to use Discord bot development as a real-world implementation in a CTE classroom, resources toward this goal are scarce. There are many tutorials of varying quality available in a quick Google search, but they are all geared toward users with some experience in programming, IDEs, and other background skills. It can be a lot to process!

The first thing to consider is which language to use. While there are official Discord implementations available for around a dozen languages, JavaScript is a great choice for beginning programmers. Resources such as codecademy (opens in new tab) provide accessible ways for students to get started writing quickly. It is also a good language for CS programs that include video game design, as it transitions easily to learning C# for Unity or C++ for Unreal Engine.

Once a language is chosen, the next step is to select the best tools for development. Visual Studio has a Node.js extension that will let many established CS programs add another development tool without adding another environment. Node.js allows for simple installation of the Eris library to a project (unlike its namesake, Eris interacts with Discord to make things run more smoothly for the developer). Discord.js is another powerful library choice.

How to Create Discord Bots

Creating a bot (opens in new tab) to run code and a server to run it in is fortunately quite simple. Most students won’t even need any assistance in setting up their own server. However, it is important to confirm they have permissions to Discord before starting the lesson; some districts block it by default, so it may take time to make a case to IT for opening it up and to allow them to do so in a way that fits with their policies and workload.

Armed with basic JavaScript skills, an IDE, and a testing environment, it becomes easier to narrow down the options for online tutorials to adapt or be inspired by for creating lessons on Discord bots in the classroom. Looking at the examples can still be a little daunting: simply getting a bot to respond with a traditional “Hello World” can take ten to fifteen lines of code. However, even this provides an excellent lesson in coding etiquette through reading and writing commented tutorials.

From this point, it becomes a matter of determining how many weeks of class time can be devoted to bot-writing, because the possibilities are endless! Students might work on a wide range of projects. An interest in building a community might lead to a bot that allows a user to automatically choose roles in a way that is unique to their server’s needs. Casual game players might build a simple game such as tic-tac-toe to entertain users while they wait for a match to start. Budding tournament organizers might create a bot to streamline stage bans in a competitive match.

Once students have the hang of creating Discord bots, their new skills can be put to use outside of the classroom. The school’s esports team is a great place to start; undoubtedly there are many fun ideas they can come up with through polling the other members. On a broader scale, servers developed around state or national scholastic esports organizations could also make use of custom bots to help run seasons or tournaments or to enhance their communities. Some, such as the Missouri Scholastic Esports Federation, are already incorporating Discord bots into competitions for students interested in esports as a career in a role outside of playing the game.

Regardless of which direction they choose to take their new skill, a Discord bot will be a valuable experience to add to a student’s portfolio when presenting themselves to future employers.

Want to learn more about how esports can benefit students? Visit (opens in new tab) for more information and to register.

Amy Harris (opens in new tab) is a mom in her tenth year of teaching CTE Computer Science, and has been the adult in the room for Hart Career Center’s esports program since its inception in 2016. She is also a director and the treasurer for the Missouri Scholastic Esports Federation.