from disnake.ext import commands
bot = commands.Bot(command_prefix="!")
@bot.event
async def on_ready():
print(f'Logged in as {bot.user.name}')
bot.load_extension("cogs.event.new_users")
@bot.slash_command()
async def test(inter):
print("HM2")
bot.run("token")
from disnake.ext import commands
class AddUsersDataBase(commands.Cog):
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.Cog.listener()
async def on_slash_command(self, user):
print("HM1")
def setup(bot: commands.Bot):
bot.add_cog(AddUsersDataBase(bot))
tells me
HM2
HM1