api_music.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:modis 作者: Infraxion 项目源码 文件源码
def build_sc_api():
    """Build the SoundCloud API for future use"""
    data = datatools.get_data()
    if "soundcloud_client_id" not in data["discord"]["keys"]:
        logger.warning("No API key found with name 'soundcloud_client_id'")
        logger.info("Please add your SoundCloud client id with name 'soundcloud_client_id' "
                    "in data.json to use Soundcloud features of the music module")
        return False

    try:
        global scclient
        scclient = soundcloud.Client(client_id=data["discord"]["keys"]["soundcloud_client_id"])
        logger.debug("SoundCloud build successful")
        return True
    except Exception as e:
        logger.exception(e)
        return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号