Hikari is an asyncio-native Discord API wrapper for Python 3.10+ (Python 3.14 compatible via <3.15 constraint). As of v2.5.0, it provides both REST and gateway (WebSocket) APIs with a model-first design. The library replaces the older lightbulb command framework with first-class interaction support. Breaking changes between 2.x minor versions mainly involve gateway event handling and model attribute casing.
pip install hikariVerified import paths — ran on the pinned version, not inferred.
Simple bot that responds to !ping with Pong! using GatewayBot.
Use an async function or a callable class that can be awaited.
Move cache configuration from a cache component to the GatewayBot constructor, e.g., bot = GatewayBot(token=..., cache=hikari.CacheSettings(...)).
Replace .mention with .user_mentions for user mentions or .role_mention_ids for role mentions.
Use the bot as a context manager (async with bot:) or call bot.close() on shutdown.
Ensure you have hikari>=2.0.0 installed: pip install hikari --upgrade
Replace the lambda with an async function.