Inspiration

Inspired by Compiler Bot. Our college server is filled with bots, which is quite messy and annoying to use various commands. So we started a project to code all the important stuff we need into one custom bot for our server! Trying to implement only Slash Commands. The Code Runner part is just a feature of our custom bot.

What it does

It receives code from users enclosed in code blocks and returns output including errors if any. Useful if we need quick help on minor snippets of code.

How we built it

We used two major APIs - Wandbox API, and of course Discord.js v13 based on Discord API. We also used other APIs like Axios(as an npm pkg) etc.

Challenges we ran into

Learning a new language framework i.e Node.js and Discord API is quite confusing for beginners, which we are.

Accomplishments that we're proud of

We got the bot running successfully, what else do we need!

What we learned

  • Working with multiple APIs
  • Organizing a project so that everybody else who wants to contribute can easily follow up
  • Writing Docs. Still not good at writing docs😢
  • Dealing with environment variables and secret tokens/ids ## What's next for Code Runner Bot Minor improvements/refactor + Our bot right now doesn't support stdin operations (compiler bot too doesn't support stdin), we'll try hard to add support for stdin in future. Also, we would like to add more languages if necessary. Right now, the following languages are supported:
  • C
  • C++
  • Java
  • Python
  • Javascript(Node.js)
  • Typescript

Built With

Share this project:

Updates