Group B - November 29 - Developing First Prototype and Finding Improvements

Welcome to the fourth meeting of group B! In this meeting, we’ll go through the core functionality of our code runner Discord bot.

Today’s Plan

First Prototype

The first prototype of our code runner Discord bot has been completed!

It has the core functionality outlined in the previous meeting of security, performance, and language support using the code execution engine Piston. You can use the bot right now in our Discord server! Head over to the #bot-spam channel to use the bot.

The bot will try to run any code you give it. Try your hardest to break it!

Instructions

There’s only one command to remember, which is !run.

!run <language> <language version>

`​`​`
{code}
`​`​`

Discord wraps code blocks using three backticks. That’s the button at the top left of your keyboard below the escape key.

An example of a correctly formatted message.


Code Walkthrough

So what was the process of coding this Discord bot? As previously mentioned, we used the programming language Go with the DiscordGo framework to create the bot. The code for the bot can be found on our GitHub page!

As all of the code is open-source, you can read each part of it and even suggest changes. We welcome any suggestions!

Finding Improvements and Bugs

The bot still isn’t perfect. We still have many future features in mind that we haven’t started implementing. If you have any suggestions for additional quality of life changes, feel free to bring it up. Bugs are also (unfortunately) sure to pop up. In fact, we’ve already come across one…

A very strange output… 🐒


…missing new line! 🍌


So keep on testing our bot and breaking it in different ways. That’s how software gets improved!

Challenges!

We’ve done a lot of talking so far. It’s time for you to use the bot yourself and see how it works firsthand!
To encourage some coding, we’ll give a few challenges where you have to write code to produce a certain output.
Now go to #bot-spam! Be free!