公告和资讯推送随机延迟1-180秒 (#48)
This commit is contained in:
		
							parent
							
								
									2e3a9f4987
								
							
						
					
					
						commit
						972ddfc492
					
				|  | @ -351,7 +351,9 @@ export default class MysNews extends base { | ||||||
|       tmp = [`原神${typeName}推送\n`, tmp] |       tmp = [`原神${typeName}推送\n`, tmp] | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     redis.set(`${this.key}${groupId}:${postId}`, '1', { EX: 3600 * 10 }) |     await redis.set(`${this.key}${groupId}:${postId}`, '1', { EX: 3600 * 10 }) | ||||||
|  |     // 随机延迟1-180秒
 | ||||||
|  |     await common.sleep(lodash.random(1, 180) * 1000) | ||||||
|     await this.e.group.sendMsg(tmp) |     await this.e.group.sendMsg(tmp) | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue