How it works

We created the bot to be able to take in a submitted picture by the user which outputs a picture of the solved problem as an image. The bot is able to solve (find roots), simplify, expand, differentiate, and integrate equations - all from just being given a picture!

We used a multitude of technologies for the creation of our bot including the Python programming language, Discord Developer Platform, and the Mathpix, Pillow, and Wolfram|Alpha APIs. The Discord Developer Platform was used to create and host the app within Discords servers. Integration of Discord was done through syncing the discord API through our scripts. The Mathpix API was integrated to display images by converting them from an image to LaTeX which was aided by Pillow (also known as PIL) which helps to manipulate the file through saving it in a suitable format. The Wolfram|Alpha API is used by querying the converted LaTeX text alongside a keyword given by the user.

disCalculator








A brand new Discord bot that can run any picture calculations, using Wolfram|Alpha and Mathpix.





















Created by Farhan,Shoeb,Erio,Sanjeev for TOHacks 2020.

Commands

The commands are initialized by .
.help - for a list of these very commands
.calc - initialize bot to listen to your query

Followed by .calc, type through a list of Wolfram|Alpha keywords, such as:

solve - evaluates roots of given expressions
expand - expands the given expression
factor - factors the given expression
derivative - finds the derivative of the given expression
integrate - evaluates the integral of a given expression


Here's an example input and output: