From a1dbb0f31d7eb4eb46f9b8351c3978e1d46df8a1 Mon Sep 17 00:00:00 2001 From: Etzelia Date: Sun, 20 Jun 2021 16:34:51 -0500 Subject: [PATCH] Closures Signed-off-by: Etzelia --- discord/echo.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discord/echo.go b/discord/echo.go index 7c230d5..df08ff1 100644 --- a/discord/echo.go +++ b/discord/echo.go @@ -10,7 +10,8 @@ import ( ) func Echo(cfg *config.Config) { - for _, e := range cfg.Echoes { + for _, echo := range cfg.Echoes { + e := echo // Closure commands = append(commands, &command{ name: e.Name, aliases: e.Aliases,