from discord import option from discord.ext import commands import star_citizen class StarCitizen(commands.Cog): def __init__(self, bot): self.bot: commands.Bot = bot @commands.slash_command( guild_ids=None, name="ship", description="Query the star citizen database about a ship", ) @option( name="ship", description="Ship you want info on, must be the exact name of the ship, eg Aegs Avenger", required=True, ) async def star_citizen(self, ctx: commands.Context, ship): await ctx.defer() embed = await star_citizen.get_ship(ship_name=ship) await ctx.send_followup(embed=embed) def setup(bot): bot.add_cog(StarCitizen(bot))