Files
NeoBot/plugins/osu!_plugin/test.py
K2Cr2O1 51fb77e6e0 feat: 新增跨平台消息互通插件及适配器优化
refactor(discord_adapter): 优化音频处理与心跳机制
feat(plugins/discord-cross): 实现QQ与Discord消息互通功能
fix(events/base): 添加platform字段到基础事件模型
2026-03-21 13:44:36 +08:00

11 lines
383 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from ossapi import Ossapi
# 初始化客户端替换为自己的client_id和client_secret
api = Ossapi("49746", "3sLQQC92twXgETwkJwixZWs5Chvhpo1HHQbYklLN")
# 根据用户名查询用户信息
print(api.user("[PAW]K2CRO4"))
# 根据用户ID查询osu模式下的用户信息
print(api.user(12092800, mode="osu").username)
# 查询指定谱面的ID
print(api.beatmap(221777).id)