mirror of
https://github.com/Rongronggg9/SlashBot.git
synced 2025-04-28 22:23:31 +08:00
fix: ouen messages in topics sent to the general topic
This commit is contained in:
parent
a66d9c3f67
commit
176bcf5aaf
11
SlashBot.py
11
SlashBot.py
@ -313,14 +313,17 @@ def reply(update: telegram.Update, ctx: telegram.ext.CallbackContext):
|
||||
|
||||
|
||||
@log
|
||||
def repeat(update: telegram.Update, ctx: telegram.ext.CallbackContext, logger: _logger):
|
||||
def repeat(update: telegram.Update, _ctx: telegram.ext.CallbackContext, logger: _logger):
|
||||
chat = update.effective_chat
|
||||
msg = update.effective_message
|
||||
if chat.id < 0:
|
||||
chat = ctx.bot.get_chat(chat.id)
|
||||
tid = msg.message_thread_id
|
||||
|
||||
logger.info(msg.text)
|
||||
msg.copy(chat.id) if chat.has_protected_content else msg.forward(chat.id)
|
||||
(
|
||||
msg.copy
|
||||
if msg.has_protected_content
|
||||
else msg.forward
|
||||
)(chat.id, message_thread_id=tid)
|
||||
|
||||
|
||||
@log
|
||||
|
Loading…
Reference in New Issue
Block a user