A discord bot that secretly watches you

A Silent Beholder

A silent beholder is a bot that lives in the discord channel secretly watching your messages.

Commands

You can interact with the bot with two commands:

1. /gaze: a silent beholder watches you - this command returns a random emoji that looks silent.

2. /talk: Try communicating with the silent beholder - this command makes the silent beholder react with unicode eye emojis.

How I built it

Discord.js

Discord.js is a library that lets you use node.js with the Discord API.

Using message.react

List of random elements that I used for ingredients to build the bot responses
Picking 2 random eye emojis from an array and sending them as reactions

discord.js provides a feature where the bot can also send reactions to messages. I picked 2 random elements from a given array of unicode eye emojis and made the respond to the user's /talk command with 2 eye reactions.

Deploying the bot

Deploying the bot using pm2

I uploaded my files to a remote server using DigitalOcean and used pm2 to let the bot run constantly.

Troubleshooting

Unknown Emoji error

I kept getting an error named "Error DiscordAPIError: Unknown Emoji". This might have to do with the fact that some unicode emojis are not supported in Discord.

Unfortunately, I had to find which emojis are working or not by trial and error. I solved this problem by removing certain emojis that seemed to be problematic.

Future plans

Sophisticated ASCII eye emojis

I bumped into ascii-art.js which is a cool node.js library that lets you write ascii arts programatically. My next plan is to use this library to procedurally generate creepy messages with ascii art.