Bot — Erste Schritte
Installation
bash
pip install nexcordMinimaler Bot
python
import nexcord
TOKEN = 'DEIN_BOT_TOKEN'
bot = nexcord.Client(token=TOKEN, prefix='!')
@bot.listen('on_ready')
async def on_ready(data):
print(f'Bot gestartet als {bot.account.username}')
@bot.command()
async def ping(ctx):
await ctx.send('Pong! 🏓')
bot.run()Bot erstellen
- Gehe zu nexcord.de → Einstellungen → Bots & Apps
- Klicke auf Neue App erstellen
- Unter „Bot" → Bot hinzufügen
- Token kopieren
Bot zu einem Server hinzufügen
Nutze die Authorize-URL:
https://nexcord.de/authorize
?clientId=DEINE_CLIENT_ID
&scopes=bot
&redirectUri=https://nexcord.de