[**RongIMLib**](../README.md) *** [RongIMLib](../globals.md) / getTotalUnreadMentionedCountByLevels # Function: getTotalUnreadMentionedCountByLevels() > **getTotalUnreadMentionedCountByLevels**(`conversationTypes`, `levels`): `Promise`\<[`RCResult`](../interfaces/RCResult.md)\<`number`\>\> 获取会话指定免打扰级别未读 @ 消息数 ## Parameters ### conversationTypes [`ConversationType`](../enumerations/ConversationType.md)[] 会话类型列表 ### levels [`NotificationLevel`](../enumerations/NotificationLevel.md)[] 免打扰级别列表,传空数组则获取全部免打扰级别未读数 ## Returns `Promise`\<[`RCResult`](../interfaces/RCResult.md)\<`number`\>\> 返回一个 [RCResult](../interfaces/RCResult.md) 类型 Promise,data 中返回会话未读数 ## Description 查找免打扰配置符合传入的免打扰级别的会话,返回所有会话中所有未读 @ 消息的总数 ## Since 5.5.1 暂不支持 Electron 平台 ## Example 获取会话指定免打扰级别未读 @ 消息数示例: ```ts const conversationTypes = [RongIMLib.ConversationType.PRIVATE]; const levels = [RongIMLib.NotificationLevel.ALL_MESSAGE]; const totalUnreadCount = await RongIMLib.getTotalUnreadMentionedCountByLevels(conversationTypes, levels); console.info('获取会话指定免打扰级别未读 @ 消息数结果:', totalUnreadCount); ```