The Adventures of Coding a Discord Bot

Me starting to write the basic code of my own mining discord bot!

Everyone uses Discord, right? No? Well, quite the majority do. So I’ve decided to turn my game into a Discord Bot! Creating a Discord Bot seemed like a good way to spread my coding influence, so I started creating one!

The Beginning

I wanted to start quickly and add a lot of stuff! I asked some people around Discord for tutorials and one pointed me towards Dapper Dino’s Bot Tutorials. I watched thru majority of them not understanding much, but my bot was set up and I could flip coins and roll dice.

That wasn’t enough so I followed a few more and added the music part to The Kepler Bot, then I wasn’t sure where to go from here. Until one day on my “Recreating Discord Miner into a Game” video, someone commented or DM’ed me, I can’t remember anymore. But they suggested that I turn my Miner Game back into a Discord Bot. Then I started to think…

The Completion

So I soon realized I was programming in Node.js, which was real similar to what I was used to programming in. Known as processingJS, which was linked to JavaScript, which is also what Node.js was also linked to, basically a lot of the stuff I knew could be used here too, which I thought was pretty neat. I soon figured my way thru Custom Emojis with some help from the mighty SpongeJr, who has also created a bot that acts like a role-play game!

I started using for loops, if statements, variables, math commands (well those were a little different but I still got used to them) and a lot more! Obviously rect(); or ellipse(); wouldn’t work as I was dealing with Discord.js and that was made completely of text and emojis, so I had to think a little creative if I wanted to create a mining scenario. Soon enough there were a lot of files in a lot of folders and it was hard to get around. But there was a working mining system, inventories, multiplayer mining, regeneration of land, and plenty more! But I soon realized that the basic code that Dapper Dino provided plus my code didn’t work too well, and things got easily confused like there were two help pages and classes everywhere which I currently don’t understand but I assume they are similar to functions (Which they probably are not :/), so I decided that it was time for a full rewrite of the entire code! Well I’d still have the data separate so there wouldn’t be a thousand lines to scroll thru if I wanted to add something new. The reason I wanted to rewrite the code is I was trying to access the Client (Known as bot in code) variable from the main file, but the other files were in a big folder. So it would be hard to access a file outside of the folder. I spent half an hour figuring it out but no luck.

The Rewrite

Thru the day I added the necessary basics like for when the bot turns on, the message function, and the commando classes. The rewrite was going great! Everything was working out! I created functions for each of the commands, everything would sync a lot better than before because they could access the same variables which saves a lot of code! I decided not to keep the music functions as I don’t see my bot as a music bot, more of a fun and helpful bot! All of the commands work fine and the command I got stuck on one point now will work much better!

And even today I’m still working on the rewrite and adding more commands! Like finishing up the top list command, adding support to check each others inventories, trading, bonuses and possibly moderation commands! I’ll put the link down here to the second and third videos when they are released, but for now, stay tuned!

Don’t forget to subscribe!: https://www.youtube.com/channel/UCocmE7xT6REn0p1kBEgmz2Q

Or follow my instagram!:
https://www.instagram.com/thekeplerteddy/

Thanks for reading! Or watching if you watched the videos!

What is it like to code 24-Hour Minecraft?

Now, you are probably wondering on 24 Hour Minecraft. What are you adding next, are you really coding 24 hours straight and will you even finish it in the end? All questions answered here.

Capturea.PNG

 

First off, What is being added next? Well, in the most recent second episode which you can watch here. I added AI, Crafting, Fixed Terrain, Bug Fixes, Tool Usage and more Survival:

I’d watch the video if you have time. In the Third Episode, from 12 to 18 hours, I hope to finish:

  • Mob Graphics, I only made the Sheep, Zombie and Skeleton Graphics. I still have to make the Player, Spider and Creeper Graphics.
  • Water, It will spread like in the actual Indev.
  • Farming, this is gonna be a hard one. I have to create planting, tilling, water checking, growth, and harvest! Uugh! XD
  • Background and Nighttime, The mobs are spawning in the day? No way! Better fix that with the Sun and Moon.
  • Menu and Settings, being able to cap off certain parts of the game to make it playable for all computers.
  • Death, the player must DIEEEEE! Because he doesn’t when he either, Gets hit to death, falls to death, or falls into the Void!
  • Lighting, this might not be too much of the challenge. Oh, have I forgotten about placing torches? Great.
  • Furnace, This will be a challenge.
  • Chest, An even greater challenge.

Probably after the third episode, if That gets all finished, then it might actually be playable. And I’ll add some extra things in the last episode. I’ll reveal when the blog post for the third episode comes out.

Captureb

Second, am I doing it for 24 hours straight? Definitely not! Might’ve broken some record though. But I would be very sick after and I wouldn’t be able to do much on here for an entire WEEK! So, No, I take breaks and get sleep. Like any programmer does. If it was 1, 2 or maybe even 3 hours. I could do a Jam perhaps.

Last, Will I even finish it in the end? Hopefully, I will, I cannot tell the future, but I at least think we will be able to add extra features like Alpha 1.2 or Beta 1.8 stuff in total. But that is if I do well.

Also, I will be doing a modding contest, where you, yes you! Get to make a mod for the game, and top three mods win!

Thanks for Reading (And Watching),

Ted.

P.S: I didn’t forget about Monument Food II, I’m still slowly working on it.

P.S.S: I’m also learning more Unity to make my next two apps, Ninja Bus and T/-d5 |E, whoops glitched out! (It is secret!) Also, Tumbl3 will be out with an update and for apple soon as well! Bye!