Inspiration

I was inspired from the standoffs at the end of A Fistful of Dollars and The Good, The Bad, and The Ugly. I loved how much the music added so I wanted to try to do that in a discord server :)

What it does

Typing !showdown will start playing in the user's current voice channel standoff music from one of three points in the song which will suddenly stop playing at one of the "peak" moments of the song. As soon as the song stops, members of the discord have to type !bang into the chat as fast as possible, and whoever enters it first will win the duel. Also can !moo

How I built it

I built it using the discord.py library in Python. I used Google Cloud to host the bot so I wouldn't need to run it on my own computer.

Challenges I ran into

Learning how to make the bot play mp3s in voice chat was difficult, and I spent a lot of time trying to get the bot to end the music exactly where I wanted it to. It ended up becoming more guess and check than actual coding and took a lot longer than I had anticipated. I'd like to figure out a better way to do that because it was annoying! Additionally, I think I added way too many if else statements as I added features which I could trim down in the future to make the bot more efficient. Lastly I couldn't figure out how to make functions that would work with the async functions I needed for discord so I'd like to learn how to make my code a little neater for next time, as I won't always be working on my own.

Accomplishments that I'm proud of

I'm proud that I learned how to use the voice part of discord bots, and I'm really happy that I got to get into google cloud computing a little bit. I'd like to do more with it in the future once I get to know what more I can do with it :)

What I learned

I learned the discord.py library, about how to setup and use Google Cloud, and a couple new quirks about python's random library I could use in the future.

What's next for Wild-West-Discord-Bot

There's this issue I encountered once in a while where if people both sent the message at really close moment it would say both players won, and I think it happens because my code just runs too slowly with the global variables and all the if else and elifs in there. I'd like to fix that and also make my code neater, it's real messy at some parts. Also I'd like to add a command to cleanly end a showdown mid-song because right now it just has to play to the end. Also a !helpwest or something to list out the commands would be useful but there are only like 4 right now so. But yes lot of work to be done 

Built With

Share this project:

Updates