text: import os
  
  import discord
  from discord.ext import commands
  from discord_slash import cog_ext, SlashCommand, SlashContext
  
  bot = commands.Bot(command_prefix="!", intents=discord.Intents.all())
  slash = SlashCommand(bot)
  
  
  class Slash(commands.Cog):
      def __init__(self, bot):
          if not hasattr(bot, "slash"):
              # Creates new SlashCommand instance to bot if bot doesn't have.
              bot.slash = SlashCommand(bot, override_type=True)
          self.bot = bot
  
      @cog_ext.cog_slash(name="test")
      async def _test(self, ctx: SlashContext):
          embed = discord.Embed(title="embed test")
          await ctx.send(content="test", embeds=[embed])
  
  
  bot.add_cog(Slash(bot))
  bot.run(os.environ.get("DISCORD_BOT_TOKEN"))
  