[**RongIMLib**](../README.md) *** [RongIMLib](../globals.md) / setUltraGroupDefaultNotificationLevel # Function: setUltraGroupDefaultNotificationLevel() > **setUltraGroupDefaultNotificationLevel**(`options`, `notificationLevel`): `Promise`\<[`RCResult`](../interfaces/RCResult.md)\<`void`\>\> 设置指定超级群或频道的默认免打扰级别 ## Parameters ### options [`IUltraGroupOption`](../interfaces/IUltraGroupOption.md) 设置超级群或频道的默认免打扰级别参数,包含会话类型、目标 Id、频道 Id,类型为 [IUltraGroupOption](../interfaces/IUltraGroupOption.md) 设置超级群默认通知配置 options: { targetId: 'xxx' }, channelId 不传或传 '' 设置超级群指定频道默认通知配置 options: { targetId: 'xxx', channelId: 'xxx' } ### notificationLevel [`NotificationLevel`](../enumerations/NotificationLevel.md) 免打扰级别 ## Returns `Promise`\<[`RCResult`](../interfaces/RCResult.md)\<`void`\>\> ## Description 为指定的超级群设置的默认免打扰逻辑,自动适用于群下的所有频道。如果针对频道另行设置了默认免打扰逻辑,则以该频道的默认设置为准 ## Since 5.2.0 仅 Web 端 IMLib 支持超级群。 ## Since 5.3.0 以后 notificationLevel 类型为 [NotificationLevel](../enumerations/NotificationLevel.md) ## Example **设置指定超级群或频道的默认免打扰级别示例:** ```ts const options = { targetId: 'targetId', channelId: 'channelId', }; const notificationLevel = RongIMLib.NotificationLevel.NOT_MESSAGE_NOTIFICATION; const res = await RongIMLib.setUltraGroupDefaultNotificationLevel(options, notificationLevel); console.log('设置指定超级群或频道的默认免打扰级别结果:', res); ```