V 2.2.9 自动匹配,手动排序
This commit is contained in:
@@ -87,15 +87,7 @@ export class DiscordAPI {
|
||||
if (typeof res_data == "string") {
|
||||
res_data = JSON.parse(res_data);
|
||||
}
|
||||
if (res_data && res_data.code != 1) {
|
||||
if (res_data.message) {
|
||||
throw new Error(res_data.message);
|
||||
} else if (res_data.description) {
|
||||
throw new Error(res_data.description)
|
||||
} else {
|
||||
throw new Error("未知错误,可联系管理员排查");
|
||||
}
|
||||
}
|
||||
// 直接返回,错误信息外面判断
|
||||
return res_data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user