Example Scripts

Posts Bot Stats

import ibl
import discord
from discord.ext import commands

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


@bot.event
async def on_ready():
    print('Bot online')

@bot.command()
@commands.is_owner()
async def poststats(ctx):
    await ibl.post_stats(bot.user.id, "infinity_auth_token", len(bot.guilds), 
number_of_shards)
    await ctx.send('Bot stats posted')

bot.run("discord_bot_token")

Bot Info Command

import ibl
import discord
from discord.ext import commands

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

@bot.event
async def on_ready():
    print('Bot online')

@bot.command()
async def botinfo(ctx,id):
    bots_info = await ibl.bot_info(id)
    embed=discord.Embed(title=f"Info on {bots_info.bot_name}", description = 
    f'''
    Name:{bots_info.bot_name}
    Certified:{bots_info.certified}
    Tags:{bots_info.tags}
    Prefix:{bots_info.prefix}
    Owner:{bots_info.owner}
    Library:{bots_info.library}
    Description:{bots_info.short_desc}
    Servers:{bots_info.servers}
    Shards:{bots_info.shards}
    Votes:{bots_info.votes}
    Website:{bots_info.website}
    Donate:{bots_info.donate}
    Support:{bots_info.support}
    Staff:{bots_info.staff}
    '''
    )
    await ctx.send(embed=embed)

bot.run("discord_bot_token")

User Info Command

import ibl
import discord
from discord.ext import commands

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

@bot.event
async def on_ready():
    print('Bot online')

@bot.command()
async def user(ctx,id):
    member_info = await ibl.user_info(id)
    embed=discord.Embed(title=f"Info on {member_info.username}", description = 
    f'''
    Name:{member_info.username}
    About:{member_info.about}
    Certified Dev:{member_info.certified_dev}
    Staff:{member_info.staff}
    Developer:{member_info.developer}
    '''
    )
    embed.set_footer(text=f"Error:{member_info.error}")
    await ctx.send(embed=embed)

bot.run("token")

Last updated