mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-27 07:54:19 +00:00
fix: replace message_chain.has usage
This commit is contained in:
@@ -1034,7 +1034,14 @@ class DiscordAdapter(abstract_platform_adapter.AbstractMessagePlatformAdapter):
|
||||
if quote_origin:
|
||||
args['reference'] = message_source.source_platform_object
|
||||
|
||||
if message.has(platform_message.At):
|
||||
has_at = False
|
||||
|
||||
for component in message.root:
|
||||
if isinstance(component, platform_message.At):
|
||||
has_at = True
|
||||
break
|
||||
|
||||
if has_at:
|
||||
args['mention_author'] = True
|
||||
|
||||
await message_source.source_platform_object.channel.send(**args)
|
||||
|
||||
Reference in New Issue
Block a user