Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commands/tmplexec: also return *discordgo.MessageSend #1662

Merged
merged 1 commit into from
May 31, 2024

Conversation

l-zeuch
Copy link
Contributor

@l-zeuch l-zeuch commented May 31, 2024

Also return *discordgo.MessageSend after executing a command via a
fake message.

Commit 97b021d ("customcommands: link to ccs in cc command ") via
PR #1624 introduced a side effect where constructs such as
{{ exec "cc" "1" }} no longer worked, thus resulting in breakage.

This patch does not fully restore the former state, however seeing as
the aforementioned commit broke things in a very subtle way it seems
acceptable to introduce a new, different behaviour.
Admittedly, with the current state of in-built commands responding with
all sorts of things that may or may not be writable to a CC variable,
this only confuses things further, but at least it is working again(TM).

At some point in the future we could consider sorting these
"inconsistencies" out and making it "just werk" with custom commands. In
light of the currently ongoing migration from GORM to sqlboiler, this
undertaking does not seem too far-fetched.

Signed-off-by: Luca Zeuch [email protected]

Also return `*discordgo.MessageSend` after executing a command via a
fake message.

Commit 97b021d ("customcommands: link to ccs in cc command ") via
PR botlabs-gg#1624 introduced a side effect where constructs such as
`{{ exec "cc" "1" }}` no longer worked, thus resulting in breakage.

This patch does *not* fully restore the former state, however seeing as
the aforementioned commit broke things in a very subtle way it seems
acceptable to introduce a new, different behaviour.
Admittedly, with the current state of in-built commands responding with
all sorts of things that may or may not be writable to a CC variable,
this only confuses things further, but at least it is working again(TM).

At some point in the future we could consider sorting these
"inconsistencies" out and making it "just werk" with custom commands. In
light of the currently ongoing migration from GORM to sqlboiler, this
undertaking does not seem too far-fetched.

Signed-off-by: Luca Zeuch <[email protected]>
@ashishjh-bst ashishjh-bst merged commit 37879f4 into botlabs-gg:dev May 31, 2024
1 check passed
@l-zeuch l-zeuch deleted the exec-cc-notwork branch July 21, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants