mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-06-01 13:09:47 +08:00
🐛 修复一个BUG, 该BUG会导致将更新记录发送至任意群内 (#117)
This commit is contained in:
parent
35f22965e7
commit
b08e6ba79d
@ -44,17 +44,23 @@ class Subscribe(BaseModel, table=True):
|
||||
sep: str = '\n',
|
||||
command_tips: str = '请输入以下命令之一:',
|
||||
command_start_text: str = '',
|
||||
force_direct: bool = False,
|
||||
):
|
||||
for bot_id in gss.active_bot:
|
||||
BOT = gss.active_bot[bot_id]
|
||||
if force_direct:
|
||||
user_type = 'direct'
|
||||
else:
|
||||
user_type = self.user_type
|
||||
ev = Event(
|
||||
bot_id=self.bot_id,
|
||||
user_id=self.user_id,
|
||||
bot_self_id=self.bot_self_id,
|
||||
user_type=self.user_type, # type: ignore
|
||||
user_type=user_type, # type: ignore
|
||||
group_id=self.group_id,
|
||||
real_bot_id=self.bot_id,
|
||||
)
|
||||
|
||||
bot = Bot(BOT, ev)
|
||||
await bot.send_option(
|
||||
reply,
|
||||
|
@ -24,4 +24,4 @@ async def send_msg_to_master(
|
||||
datas = await gs_subscribe.get_subscribe('主人用户')
|
||||
if datas:
|
||||
for subscribe in datas:
|
||||
await subscribe.send(message)
|
||||
await subscribe.send(message, force_direct=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user