Twentysix26 / x26-Cogs

General purpose cogs for Red V3
GNU General Public License v3.0
41 stars 30 forks source link

[Bug] Recipient error caused by send-message executing from a forum message #75

Open EternalllZM opened 10 months ago

EternalllZM commented 10 months ago

Cog

Describe the bug A send-message action pointing to a different channel when executed from a message sent in a forum channel will not execute and send an error to the monitor.

To Reproduce Steps to reproduce the behavior:

name: test-issue75
event: on-message
rank: 1
if:
  - message-matches-any: ["sdhjkgbskd"]
do:
  - delete-user-message:
  - send-message: [955301063991369788, "I was told to send here"] # ERROR
  - send-message: [$channel_id, "Can I send here?"] # DOES NOT ERROR
  - exit:

Send "sdhjkgbskd" in a forum channel. Message deletes but the send-message into channelID 955301063991369788 never executes, errors out into def monitor with the following:

Expected behavior The send-message should execute. I speculate this may be related to forum jank caused by #76

Error Message

  [07/28 06:26:55] [Warden] (test-issue75): Failed to send message, I could not find the recipient.
EternalllZM commented 3 weeks ago

Updating the description and deleting speculative comments that cannot be reproduced. The issue is caused by a send-message action pointing to a different channel when executed from a message sent in a forum channel.

name: test-issue75
event: on-message
rank: 1
if:
  - message-matches-any: ["sdhjkgbskd"]
do:
  - delete-user-message:
  - send-message: [955301063991369788, "I was told to send here"] # ERROR
  - send-message: [$channel_id, "Can I send here?"] # DOES NOT ERROR
  - exit:

Send "sdhjkgbskd" in a forum channel. Message deletes but the send-message into channelID 955301063991369788 never executes, errors out into def monitor with the following:

  [07/28 06:26:55] [Warden] (test-issue75): Failed to send message, I could not find the recipient.