mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 15:01:34 +08:00
- Add /thread slash command that creates a Discord thread and starts a new Hermes session in it. The starter message (if provided) becomes the first user input in the new session. - Add discord.auto_thread config option (DISCORD_AUTO_THREAD env var): when enabled, every message in a text channel automatically creates a thread, allowing parallel isolated sessions. - Fix Discord media method signatures to accept metadata kwarg (send_voice, send_image_file, send_image) — prevents TypeError when the base adapter passes platform metadata. - Fix test mock isolation: add app_commands and ForumChannel to discord mocks so tests pass in full-suite runs. Based on PRs #866 and #1109 by insecurejezza, modified per review: removed /channel command (unsafe), added auto_thread feature, made /thread dispatch new sessions. Co-authored-by: insecurejezza <insecurejezza@users.noreply.github.com>
10 lines
338 B
Python
10 lines
338 B
Python
import inspect
|
|
|
|
from gateway.platforms.discord import DiscordAdapter
|
|
|
|
|
|
def test_discord_media_methods_accept_metadata_kwarg():
|
|
for method_name in ("send_voice", "send_image_file", "send_image"):
|
|
signature = inspect.signature(getattr(DiscordAdapter, method_name))
|
|
assert "metadata" in signature.parameters, method_name
|