Skip to content

[Bug]: Gateway /sethome command writes channel ID in config.yaml instead of .env file #6447

@steromano87

Description

@steromano87

Bug Description

If send the /sethome command in a Discord channel, the channel ID is written (as an env variable) inside the config.yaml file instead of the .env variable (where it is supposed to live).

Steps to Reproduce

  1. Configure Discord as messaging platform
  2. In the .env file, set the DISCORD_HOME_CHANNEL variable to an existing channel
  3. Inside a Discord channel (different from the one configured in the previous step), send the /sethome command

Expected Behavior

Inside the .env file, the DISCORD_HOME_CHANNEL is set to the new channel ID

Actual Behavior

Inside the .env file, the value of the DISCORD_HOME_CHANNEL variable remains unchanged.
Inside the config.yaml a line is appended at the end of file with the following content:
DISCORD_HOME_CHANNEL:

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

Discord

Operating System

Debian Trixie

Python Version

3.11.9

Hermes Version

0.8.0

Relevant Logs / Traceback

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    sweeper:implemented-on-mainSweeper: behavior already present on current maintype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions