From 4fb7cc2928cfa1c8d7fb6234a123a9288cd06e15 Mon Sep 17 00:00:00 2001 From: Etzelia Date: Sun, 20 Jun 2021 21:35:48 +0000 Subject: [PATCH] Closures (#9) Closures Signed-off-by: Etzelia Reviewed-on: https://git.birbmc.com/Etzelia/canopeas/pulls/9 Co-Authored-By: Etzelia Co-Committed-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,