Example #1
0
async def is_api_admin(ctx: commands.Context):
    api_user = await API.get_user(cog=ctx.cog, member=ctx.author)
    ctx.audio_api_user = api_user
    if not api_user:
        return False
    return not api_user.is_blacklisted and (api_user.is_admin
                                            or api_user.is_superuser)
Example #2
0
async def is_api_user(ctx: commands.Context):
    api_user = await API.get_user(cog=ctx.cog, member=ctx.author)
    ctx.audio_api_user = api_user
    if not api_user:
        return False
    return api_user.can_read