async def inventory(self, ctx, *, target: discord.Member = None): # find who's profile to pull up. target = tools.get_target(target, ctx.message.author.id) # check if the user's profile actually exists check = db["Inventory"].count_documents({"_id": target}) if check == 0: em = discord.Embed( color=0xadcca6, description= f"**{ctx.author.name}#{ctx.author.discriminator}** I couldn't find any profile linked to your account. Do `ax createprofile` to create one. Please join the [Support Server](https://discord.gg/2TCQtNs8kN) if you believe this is a mistake." ) await ctx.send(embed=em) return # inventory variables main_weapon = _db.get_weapons(target)[0] secondary_weapon = _db.get_weapons(target)[1] main_weapon_xp = _db.get_weapons(target)[2] secondary_weapon_xp = _db.get_weapons(target)[3] main_weapon_e = _db.main_weapon_e_picker(main_weapon) secondary_weapon_e = _db.secondary_weapon_e_picker(secondary_weapon) balance = _db.get_balance(target) p = _db.get_prefix(ctx.message.guild.id) healing_potion = _db.get_item(target, "healing_potion", ctx.message.guild.id, "m") # create inventory embed em = embeds.show_inv(balance, main_weapon_e, main_weapon, main_weapon_xp, secondary_weapon_e, secondary_weapon, secondary_weapon_xp, healing_potion, p) await ctx.send(embed=em)
async def stats(self, ctx): p = _db.get_prefix(ctx.message.guild.id) em = discord.Embed(title="`stats`", description="Displays Project Ax's stats.", color=0xadcca6) em.add_field(name="Usage", value=f"`{p}stats`", inline=False) await ctx.send(embed=em)
async def invite(self, ctx): p = _db.get_prefix(ctx.message.guild.id) em = discord.Embed(title="`invite`", description="Invite Project Ax to your own server!", color=0xadcca6) em.add_field(name="Usage", value=f"`{p}invite`", inline=False) await ctx.send(embed=em)
async def ping(self, ctx): p = _db.get_prefix(ctx.message.guild.id) em = discord.Embed(title="`prefix`", description="Shows the bot's latency.", color=0xadcca6) em.add_field(name="Usage", value=f"`{p}prefix`", inline=False) await ctx.send(embed=em)
async def weapon(self, ctx, *, weapon): # variables desc = "Project Ax - v1 Weapon (stage 1)" thumbnail = _json.get_art()[weapon.lower()] p = _db.get_prefix(ctx.message.guild.id) await ctx.send( embed=embeds.inventory_weapon(weapon.lower(), desc, thumbnail, p))
async def readme(self, ctx): p = _db.get_prefix(ctx.message.guild.id) em = discord.Embed(title="`readme` / `docs`", description="shows Project Ax's Docs", color=0xadcca6) em.add_field(name="Usage", value=f"`{p}readme`\n`{p}docs`", inline=False) await ctx.send(embed=em)
async def profile(self, ctx): p = _db.get_prefix(ctx.message.guild.id) em = discord.Embed( title="`profile` / `p`", description= f"Shows your Project Ax profile. If you don't already have one, create a profile by doing `{p}createprofile`!", color=0xadcca6) em.add_field(name="Usage", value=f"`{p}profile`\n`{p}p`", inline=False) await ctx.send(embed=em)
async def createprofile(self, ctx): p = _db.get_prefix(ctx.message.guild.id) em = discord.Embed(title="`createprofile` / `cp`", description="Create a Project Ax profile!", color=0xadcca6) em.add_field(name="Usage", value=f"`{p}createprofile`\n`{p}cp`\n`{p}cprofile`", inline=False) await ctx.send(embed=em)
async def config(self, ctx): p = _db.get_prefix(ctx.message.guild.id) em = discord.Embed(color=0xadcca6, title="Project Ax Configuration") em.add_field(name="Commands", value=f"`{p}prefix`") em.set_thumbnail( url= "https://media.discordapp.net/attachments/839537047470473227/840563743284133908/pixil-frame-0_37.png?width=425&height=425" ) em.set_footer( text=f"do \"{p}help <command>\" to see the details of a command.") await ctx.send(embed=em)
async def delprofile(self, ctx): p = _db.get_prefix(ctx.message.guild.id) em = discord.Embed( title="`delprofile` / `delp`", description= "Deletes a Project Ax profile. This action is irreversable.", color=0xadcca6) em.add_field(name="Permissions", value="Bot Owner", inline=False) em.add_field(name="Usage", value=f"`{p}delprofile 387984284734062592`", inline=False) await ctx.send(embed=em)
async def die(self, ctx): p = _db.get_prefix(ctx.message.guild.id) em = discord.Embed( title="`die`", description= "Kills and restarts the bot. Add a \"pull\" parameter to make it update by pulling from the [GitHub](https://github.com/Dok4440/ProjectAx).", color=0xadcca6) em.add_field(name="Permissions", value="Bot Owner", inline=False) em.add_field(name="Usage", value=f"`{p}die`\n`{p}die pull`", inline=False) await ctx.send(embed=em)
async def prefix(self, ctx): p = _db.get_prefix(ctx.message.guild.id) em = discord.Embed( title="`prefix`", description= f"Changes the bot's prefix. Do `{p}prefix ax` or `{p}prefix default` to change it back to the default one. To see the bot's current prefix, do `@ProjectAx prefix`", color=0xadcca6) em.add_field(name="Permissions", value="ManageGuild Permission", inline=False) em.add_field(name="Usage", value=f"`{p}prefix`", inline=False) await ctx.send(embed=em)
async def editprofile(self, ctx): p = _db.get_prefix(ctx.message.guild.id) em = discord.Embed( title="`editprofile` / `editp`", description= "Edits a Project Ax profile. List of things you can change; `age`, `world`, `district`, `first_name`, `last_name`, `friend_id`, `gender`, `height`, `looks`, `xp`.", color=0xadcca6) em.add_field(name="Permissions", value="Bot Owner", inline=False) em.add_field( name="Usage", value= f"`{p}editprofile @Dok first_name \"Chad\"`\n`{p}editp @JuicBblue age 69`", inline=False) await ctx.send(embed=em)
async def help(self, ctx): p = _db.get_prefix(ctx.message.guild.id) em = discord.Embed(color=0xadcca6, title="Project Ax") em.add_field( name="Modules", value= "`Configuration`\n`Profile`\n`Miscellaneous`\n`Bot Admin Only`") em.set_footer( text=f"do \"{p}help <module>\" to see all commands in a module.") em.set_thumbnail( url= "https://media.discordapp.net/attachments/839537047470473227/840579240088043560/pixil-frame-0_40.png?width=425&height=425" ) await ctx.send(embed=em)
async def say(self, ctx): p = _db.get_prefix(ctx.message.guild.id) em = discord.Embed(title="`say` / `repeat`", description="Make the bot say something!", color=0xadcca6) em.add_field(name="Permissions", value="ManageGuild Permission", inline=False) em.add_field( name="Usage", value= f"`{p}say Hi, I'm super cool!`\n`{p}repeat \"Project Ax is so cool..\"`", inline=False) await ctx.send(embed=em)
async def healing_potion(self, ctx, *, target: discord.Member = None): # find who's profile to pull up. target = tools.get_target(target, ctx.message.author.id) # variables item = "Healing Potion" desc = "Item used for healing your character" stats = "Heals `150` of your character's life points" amount = _db.get_item(target, "healing_potion", ctx.message.guild.id, "nm") thumbnail = "https://media.discordapp.net/attachments/804705780557021214/842031340521783316/pixil-frame-0_6.png" p = _db.get_prefix(ctx.message.guild.id) # create embed em = embeds.inventory_item(amount, desc, item, stats, p, thumbnail) await ctx.send(embed=em)