Skip to content

Commit

Permalink
Add with_counts option to API::Server.resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
swarley committed Nov 15, 2020
1 parent e53db8a commit 5fb7b37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/discordrb/api/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ def create(token, name, region = :'eu-central')

# Get a server's data
# https://discord.com/developers/docs/resources/guild#get-guild
def resolve(token, server_id)
def resolve(token, server_id, with_counts = nil)
Discordrb::API.request(
:guilds_sid,
server_id,
:get,
"#{Discordrb::API.api_base}/guilds/#{server_id}",
"#{Discordrb::API.api_base}/guilds/#{server_id}#{'?with_counts=true' if with_counts}",
Authorization: token
)
end
Expand Down

0 comments on commit 5fb7b37

Please sign in to comment.