DEV Community

Prashant | Eito
Prashant | Eito

Posted on : For Discord Bots

What is Airi API?

Airi is an API that provides Anime Waifus, Facts, Quote info.

What is is an async wrapper for Airi API written in Python, that allows you to use Airi API directly. This library is especially made for discord bots.

An Example:

This is just an example;

import airi
from discord.ext import commands

bot = commands.Bot(command_prefix='!')

async def on_ready():
    print(f'{} has connected to Discord!')

async def test(ctx):
    client = airi.Client("TOKEN") #where, TOKEN your AIRI BOT TOKEN
    fact = await client.fact()
    await ctx.send(fact.fact)'DISCORD BOT TOKEN')
Enter fullscreen mode Exit fullscreen mode

It's actually very simple to use!
For more example, check more examples here.
Want to know how to get started? check quickstart guide here.

Related Links:

Source Code

Top comments (0)