Inspiration

I saw a video on YouTube video by PolyMars where he created a twitter bot to play the snake game and I thought that looks awesome. So, I created a discord bot to play the snake game.

What it does

It is used to play the classic snake game. The direction of the snake is changed by rotating it clockwise or counter-clockwise by reacting to the message. The reaction which has a higher count determines the change.

How we built it

I used discord.py to build the bot. The game is drawn using discord emojis. The bot is currently deployed to Linode so anyone can add it to their server and the game can be played in the snake_game channel

Challenges we ran into

I ran into some challenges with plotting the grid i.e. displaying the emojis properly and also while retrieving the reactions. ~There is still a bug that sometimes the snake body will not despawn when the snake moves, I'll be able to fix that by the deadline, I hope~ This does not affect gameplay since in one or two iterations it goes awat but as seen in the video if the food is spawning just behind the snake then this is a bit confusing.

Accomplishments that we're proud of

It's a playable discord snake game. It shows the high score and current score when the game ends and also if a new high score has been set.

What we learned

How to work with reactions for a discord bot. Also some things about the Discord API

What's next for Snake Bot

I would like to add custom emojis so that it looks and feels more polished and also to enable the bot in the user's DMs.

Team Name: DedSec

Built With

Share this project:

Updates