mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-04 02:26:11 +08:00
release
This commit is contained in:
parent
111378b909
commit
3b4bb8bee9
@ -55,7 +55,7 @@ class Arknights(metaclass=Singleton):
|
|||||||
async def fetch_new_post(self, _) -> list[Post]:
|
async def fetch_new_post(self, _) -> list[Post]:
|
||||||
try:
|
try:
|
||||||
data = await self.get_announce_list()
|
data = await self.get_announce_list()
|
||||||
if self.inited['default'] or True: # FIXME
|
if self.inited['default']:
|
||||||
return await self.filter(data)
|
return await self.filter(data)
|
||||||
else:
|
else:
|
||||||
await self.filter(data, True)
|
await self.filter(data, True)
|
||||||
|
@ -10,7 +10,7 @@ LAST_SEND_TIME = time.time()
|
|||||||
|
|
||||||
async def do_send_msgs():
|
async def do_send_msgs():
|
||||||
global LAST_SEND_TIME
|
global LAST_SEND_TIME
|
||||||
if time.time() - LAST_SEND_TIME < 15: # FIXME
|
if time.time() - LAST_SEND_TIME < 1.5:
|
||||||
return
|
return
|
||||||
if QUEUE:
|
if QUEUE:
|
||||||
bot, user, user_type, msg, retry_time = QUEUE.pop(0)
|
bot, user, user_type, msg, retry_time = QUEUE.pop(0)
|
||||||
@ -28,6 +28,6 @@ async def do_send_msgs():
|
|||||||
|
|
||||||
def send_msgs(bot, user, user_type, msgs):
|
def send_msgs(bot, user, user_type, msgs):
|
||||||
for msg in msgs:
|
for msg in msgs:
|
||||||
QUEUE.append((bot, user, user_type, msg, 3))
|
QUEUE.append((bot, user, user_type, msg, 2))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user