Begin here

Quickstart

Set up a minimal handler and run the bot with your token.

Minimal bot

python
import wizardgram bot = wizardgram.Bot(token="YOUR_BOT_TOKEN") @bot.command("start") async def start(ctx: wizardgram.Context) -> None: await ctx.reply("Hello!") if __name__ == "__main__": bot.run()

This creates a bot and handles the /start command by replying with a message. It is the smallest pattern for getting a bot running with wizardgram.

Token setup

Set your token before running the script. The project documents both a bash and PowerShell example.

bash
export WIZARDGRAM_TOKEN="your-token-here"
powershell
$env:WIZARDGRAM_TOKEN="..."
Heads-up

Use your token in the environment before you start the bot process.