Coding Projects
Discord Bots
I created a Discord bot in order to help manage the inventory and currency balance of players for online role playing in discord servers. The bot also includes a shop system, gacha system, and simple commands such as rolling dice or flipping a coin. I've made several different iterations of the bot, improving its features each time. One of my goals is to have one that is capable of being run simultaneously on many servers, and have easily customizable options for server admins. Currently the database being used is MongoDB, though I am looking into switching over to PostgreSQL. The bot is coded with Python using discord.py.
Example of code for a 10 pull item gacha:
# Item gacha command
@client.command()
async def gacha10(ctx):
author_id = ctx.author.id
user = userdb.find_one({"_id": author_id})
if not userdb.find_one({"_id": author_id}):
await ctx.send("You are not registered")
elif user["balance"] >= 50:
prevbal = user["balance"]
name = user["user"]
rollcount = user["rollcount"]
rollnumber = 10
if "Special offer" in user["skills"]: # checks for bonus
rollnumber += 1
getstring = f"{name}! You got:"
for i in range(rollnumber):
get = randrange(0, gachacount)
getitem = itemlist.find_one({"_id": get})
getname = getitem["name"]
userinventory = useritems.find_one({"_id": author_id})
qty = userinventory[getname]
useritems.update_one({"_id": author_id}, {"$set": {getname: qty + 1}})
getstring = getstring + f"\n{getname}"
bal = user["balance"] - 50
rollcount += 10
userdb.update_one({"_id": author_id}, {"$set": {"balance": bal}})
userdb.update_one({"_id": author_id}, {"$set": {"rollcount": rollcount}})
getstring += f"\n\nPrevious Balance: {prevbal}\nUpdated Balance: {bal}"
await ctx.send(getstring)
else:
await ctx.send(f"You don't have enough coins! You only have {user['balance']}!")
Screenshots of Bot:
Visual Novel Game
I will be working on the coding for a visual novel game titled Total Upheaval by vcentei. The initial programming was done by another person, so the current demo does not contain my work. The project's engine will be switched to Ren'py.