diff --git a/jarvis/cogs/dbrand.py b/jarvis/cogs/dbrand.py index 7c516e2..51fc23d 100644 --- a/jarvis/cogs/dbrand.py +++ b/jarvis/cogs/dbrand.py @@ -7,6 +7,7 @@ from jarvis.utils.field import Field from jarvis.data.dbrand import shipping_lookup from discord.ext import commands from discord_slash import cog_ext +from discord_slash.utils.manage_commands import create_option class DbrandCog(commands.Cog): @@ -24,44 +25,62 @@ class DbrandCog(commands.Cog): self.api_url = get_config().urls["dbrand_shipping"] self.cache = {} - # @cog_ext.cog_slash(name="db", aliases=["dbrand"], pass_context=True) - # async def _db(self, ctx): - # if ctx.invoked_subcommand is None: - # await ctx.send( - # "Available subcommands: `grip`, `support`, " - # + "`skin`, `prism`, `shipping`, `camo`" - # ) - @cog_ext.cog_subcommand( base="db", name="skin", guild_ids=[578757004059738142] ) async def _skin(self, ctx): await ctx.send(self.base_url + "shop/skins") - # @_db.command(name="robotcamo", aliases=["rc", "robot", "camo"]) @cog_ext.cog_subcommand( base="db", name="robotcamo", guild_ids=[578757004059738142] ) async def _camo(self, ctx): await ctx.send(self.base_url + "shop/special-edition/robot-camo") - # @_db.command(name="grip", aliases=["g", "case"]) @cog_ext.cog_subcommand( base="db", name="grip", guild_ids=[578757004059738142] ) async def _grip(self, ctx): await ctx.send(self.base_url + "shop/grip/#grip-devices") - # @_db.command(name="support", aliases=["help", "contact"]) @cog_ext.cog_subcommand( base="db", name="contact", guild_ids=[578757004059738142] ) + async def _contact(self, ctx): + await ctx.send(self.base_url + "contact") + + @cog_ext.cog_subcommand( + base="db", name="support", guild_ids=[578757004059738142] + ) async def _support(self, ctx): await ctx.send(self.base_url + "contact") - # @_db.command(name="shipping", aliases=["ship", "s"]) @cog_ext.cog_subcommand( - base="db", name="ship", guild_ids=[578757004059738142] + base="db", name="orderstat", guild_ids=[578757004059738142] + ) + async def _orderstat(self, ctx): + await ctx.send(self.base_url + "order-status") + + @cog_ext.cog_subcommand( + base="db", name="orders", guild_ids=[578757004059738142] + ) + async def _orders(self, ctx): + await ctx.send(self.base_url + "order-status") + + @cog_ext.cog_subcommand( + base="db", + name="ship", + guild_ids=[578757004059738142], + options=[ + ( + create_option( + name="search", + description="Country search query (2 character code, country name, emoji)", + option_type=3, + required=True, + ) + ) + ], ) async def _shipping(self, ctx, *, search: str): await ctx.defer()