From 1ad0494978a9e81db0c7eb7e4777bdc35ce0c0d1 Mon Sep 17 00:00:00 2001 From: Jeppe Vennekilde Date: Wed, 12 Jul 2023 19:21:41 +0200 Subject: [PATCH] Added non-token authorized call to /v2/guild The arg has always been there, but it was never used, so i assume it was an oversight --- guild.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/guild.go b/guild.go index c682c71..b4313c0 100644 --- a/guild.go +++ b/guild.go @@ -132,7 +132,13 @@ type GuildTeam struct { // Guild returns the guilds general information func (s *Session) Guild(guild string, auth bool) (resp Guild, err error) { - err = s.getWithAuth(concatStrings("/v2/guild/", guild), &resp) + if auth { + // Request authenticated general guild information + err = s.getWithAuth(concatStrings("/v2/guild/", guild), &resp) + } else { + // Request public general guild information + err = s.get(concatStrings("/v2/guild/", guild), &resp) + } return }