Welcome to NeoCord’s documentation!
An elegant asynchronous API wrapper around Discord Bot API.
Features
Pythonic & asynchronous API interface using asyncio.
Object Oriented design with no dirty payloads involved.
Proper handling and prevention of HTTPs ratelimits.
Performant and optimized for all use cases.
Easy to use, Consistent and fully user friendly.
Installation
NeoCord requires Python 3.8 or higher.
This library can be installed by the traditional and python’s favorite package manager pip:
pip install -U neocord
Basic Usage
import neocord
client = neocord.Client()
# Register a READY event listener that fires whenever
# the bot gets ready initally. "once" sets the event to call only once.
@client.on('ready', once=True)
async def on_ready():
print(f'{client.user} is ready.')
# Listen to messages...
@client.on('message')
async def on_message(message):
if message.author.bot:
# Don't respond to bots (or ourselves).
return
if message.content.lower() == '!ping':
# command used, let's send a response!
await message.channel.send('Pong from NeoCord!')
# run the bot.
client.run('bot-token')
Explore
You can explore the possibilites of this library in this documentation. These are the pages that you can checkout.