-
Notifications
You must be signed in to change notification settings - Fork 939
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
customcommands: link to ccs in cc command #1624
Conversation
Signed-off-by: SoggySaussages <[email protected]>
Signed-off-by: SoggySaussages <[email protected]>
if control panel is not publicly does not really matter, because non-members can't see command's return : ) |
I thought about only returning the links if the executing user has read permission. The reason I didn't was the logs command doesn't do that by default either. It doesn't check if the executing user has log read permission before sending the link, it just shows an error message on the dash if you try to click it without the right permission. I could see implementing said check for the executing user, but currently I am against only returning links if the guild members or roles readable. I think it should match the behaviour of "if this link isn't for you, ignore it" exhibited by the logs command. I am interested to hear your thoughts. |
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]>
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]>
Link to the CC's corresponding edit page on the dashboard when examining a single CC with the CustomCommands command. The link is masked by the CC ID so the user-facing response doesn't get any more bulky.
Also suppresses embeds so said links do not become embeds.
Signed-off-by SoggySaussages [email protected]