20 lines
566 B
Python
20 lines
566 B
Python
|
|
import disnake
|
||
|
|
import disnake.ext.commands as commands
|
||
|
|
import asyncio
|
||
|
|
|
||
|
|
print(f"Disnake version: {disnake.__version__}")
|
||
|
|
bot = commands.Bot(command_prefix="!")
|
||
|
|
print(f"Bot has setup_hook: {hasattr(bot, 'setup_hook')}")
|
||
|
|
|
||
|
|
async def test():
|
||
|
|
print("Testing setup_hook call...")
|
||
|
|
class TestBot(commands.Bot):
|
||
|
|
async def setup_hook(self):
|
||
|
|
print("setup_hook CALLED!")
|
||
|
|
|
||
|
|
tbot = TestBot(command_prefix="!")
|
||
|
|
# We won't start it because we don't have a token here,
|
||
|
|
# but we can check if the library expects it.
|
||
|
|
|
||
|
|
asyncio.run(test())
|