Skip to main content

Modal Handler

This command sends anonymous messages submitted via the modal.

For more information about the anonymous channel, see this page.

Trigger

Type: Modal
Custom ID: \Aanon_submit\b

Configuration

See the anonymous channel overview for in-depth information about configuration.

Code

{{/*
Handler for anon submit modal.
See <https://yagpdb-cc.github.io/fun/anon-channel/modal-handler> for more information.

Author: SoggySaussages <https://github.com/SoggySaussages>
*/}}

{{ $MAIN_CC_ID := 0 }}

{{/* CONFIG ENDS */}}

{{ if not $MAIN_CC_ID }}
{{ with dbGet 0 "anon_main_cc_id" }}
{{ $MAIN_CC_ID = toInt .Value }}
{{ else }}
An error occurred, config variables not set correctly. Please contact a server admin.
{{ return }}
{{ end }}
{{ end }}
{{ execCC $MAIN_CC_ID nil 0 ( index .Values 0 ) }}
{{ ephemeralResponse }}
Your message has been sent!

Author

This custom command was written by @soggysaussages.