Inspiration
We wanted to build an internet of things connected hardware device but couldn't get any of the low level hardware to connect to devices over WiFi. This caused us to pivot idea and instead connect a discord bot to an Amazon Echo.
What it does
It takes commands in discord and sends messages to Alexa or takes Alexa commands and interacts with the discord server. A full list of discord commands with their usage can be obtained using !help e.g. !say queues a message in the Echo's inbox so when a voice command to check the inbox is used again the message will be repeated by Alexa.
How we built it
We created a nodejs server that uses discordjs to communicate with a discord bot. This server communicates with Alexa through HTTPS requests that are issued by the Alexa skill.
Challenges we ran into
Alexa is actually very bad at understanding individual words so we couldn't create intuitive voice commands like "tell discord ". Another issue with Alexa is that it can't understand the word 'Discord' so we used server instead but this makes interactions with the skill feel weird. We also couldn't use keywords used by other parts of Alexa like "message" which again obfuscates the voice commands. We couldn't find suitable free hosting for our web-server so we have used a local tunnel for a temporary DNS addresses for our server.
Accomplishments that we're proud of
This was the first time any of us have used JavaScript or Alexa skills and considering that we think we ended up using these technologies quite well. It was also our first hackathon so we were also not used to such a short deadline for an open-ended project but I think we coped well.
What we learned
We learned a lot about JavaScript and nodejs as these frameworks make up almost all of our hack. It also made us appreciate how much more difficult it is to make secure applications than the simple vulnerable/exploitable ones.
What's next for Discord Bot
We'd like to implement the following features/changes in the future: modifying the web-server to use HTTPS, hosting the web-server on a domain, creating a more advanced protocol that can handle multiple Alexas and Discord servers, adding support for other devices like Google Home. Unfortunately however, it's more likely our code will fall apart and catch fire than achieve this.
Built With
- alexa
- discord
- discordjs
- javascript
- node.js
Log in or sign up for Devpost to join the conversation.