~shunter/cordcgi

579e0c9a9be1cf9ae115ebd5b6472f0f79efd948 — Samuel Hunter 3 years ago 3bcdeb6
Pipe message content through stdin
1 files changed, 1 insertions(+), 0 deletions(-)

M discordcgi.go
M discordcgi.go => discordcgi.go +1 -0
@@ 97,6 97,7 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
		nanotime = mtime.UnixNano()
	}

	cmd.Stdin = strings.NewReader(m.Content)
	cmd.Stdout = &out
	cmd.Env = append(os.Environ(),
		"DISCORD_MESSAGE="+m.ID,