MCPcopy
hub / github.com/nonebot/nonebot2 / has

Method has

nonebot/internal/adapter/message.py:286–288  ·  view source on GitHub ↗

与 {ref}``__contains__` ` 相同

(self, value: TMS | str)

Source from the content-addressed store, hash-verified

284 return super().__contains__(value)
285
286 def has(self, value: TMS | str) -> bool:
287 """与 {ref}``__contains__` <nonebot.adapters.Message.__contains__>` 相同"""
288 return value in self
289
290 def index(self, value: TMS | str, *args: SupportsIndex) -> int:
291 """索引消息段

Callers 1

test_message_containsFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_message_containsFunction · 0.64