refactor: fix typo and add comments in WebHonorType

This commit is contained in:
Wesley F. Young 2024-08-09 15:22:34 +08:00
parent d663a58d65
commit 22e7eb1ffc
2 changed files with 22 additions and 7 deletions

View File

@ -194,7 +194,7 @@ export class NTQQWebApi {
const HonorInfo: any = { group_id: groupCode }; const HonorInfo: any = { group_id: groupCode };
if (getType === WebHonorType.TALKACTIVE || getType === WebHonorType.ALL) { if (getType === WebHonorType.TALKATIVE || getType === WebHonorType.ALL) {
try { try {
const RetInternal = await getDataInternal(groupCode, 1); const RetInternal = await getDataInternal(groupCode, 1);
if (!RetInternal) { if (!RetInternal) {
@ -221,7 +221,7 @@ export class NTQQWebApi {
this.context.logger.logDebug(e); this.context.logger.logDebug(e);
} }
} }
if (getType === WebHonorType.PERFROMER || getType === WebHonorType.ALL) { if (getType === WebHonorType.PERFORMER || getType === WebHonorType.ALL) {
try { try {
const RetInternal = await getDataInternal(groupCode, 2); const RetInternal = await getDataInternal(groupCode, 2);
if (!RetInternal) { if (!RetInternal) {
@ -240,7 +240,7 @@ export class NTQQWebApi {
this.context.logger.logDebug(e); this.context.logger.logDebug(e);
} }
} }
if (getType === WebHonorType.PERFROMER || getType === WebHonorType.ALL) { if (getType === WebHonorType.PERFORMER || getType === WebHonorType.ALL) {
try { try {
const RetInternal = await getDataInternal(groupCode, 3); const RetInternal = await getDataInternal(groupCode, 3);
if (!RetInternal) { if (!RetInternal) {

View File

@ -1,9 +1,24 @@
export enum WebHonorType { export enum WebHonorType {
ALL = 'all', ALL = 'all',
TALKACTIVE = 'talkative', /**
PERFROMER = 'performer', *
*/
TALKATIVE = 'talkative',
/**
*
*/
PERFORMER = 'performer',
/**
*
*/
LEGEND = 'legend', LEGEND = 'legend',
STORONGE_NEWBI = 'strong_newbie', /**
* R.I.P
*/
STRONG_NEWBIE = 'strong_newbie',
/**
*
*/
EMOTION = 'emotion' EMOTION = 'emotion'
} }
export interface WebApiGroupMember { export interface WebApiGroupMember {
@ -107,4 +122,4 @@ export interface GroupEssenceMsgRet {
group_role: number group_role: number
config_page_url: string config_page_url: string
} }
} }