From 625d0d9870412bd3ec1535c2dce1a8a92a0d90e5 Mon Sep 17 00:00:00 2001 From: M Price Date: Wed, 3 Jan 2024 00:55:04 +1000 Subject: [PATCH] chore: remove unnecessary vars --- example.env | 5 ----- internal/dgclient/dgclient.go | 14 +++----------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/example.env b/example.env index 1a2516a..5c779fe 100644 --- a/example.env +++ b/example.env @@ -6,11 +6,6 @@ REACTROLES_SLASHCOMMANDS= DISCORD_TOKEN= DISCORD_APPID= -# Roles that give user permissions to use commands -DISCORD_ROLEADDROLEID= -DISCORD_ROLEREMOVEROLEID= -DISCORD_ROLECHANNEL= - # Postgres Config POSTGRES_USER= POSTGRES_PASSWORD= diff --git a/internal/dgclient/dgclient.go b/internal/dgclient/dgclient.go index 2fa322b..c33cffa 100644 --- a/internal/dgclient/dgclient.go +++ b/internal/dgclient/dgclient.go @@ -11,13 +11,9 @@ import ( ) type DiscordGoClientParams struct { - Token string - RoleMessage string - RoleChannel string - RoleAddRoleID string - RoleRemoveRoleID string - AppID string - DB *pgdb.ReactRolesDatabase `ignored:"true"` + Token string + AppID string + DB *pgdb.ReactRolesDatabase `ignored:"true"` } type DiscordGoClient struct { @@ -26,10 +22,6 @@ type DiscordGoClient struct { } func GetClient(params DiscordGoClientParams) *DiscordGoClient { - if params.RoleChannel == "" { - log.Fatal("Role channel not set in client params") - } - dg, err := discordgo.New("Bot " + params.Token) if err != nil { log.Fatal(err)