dsu3 0.9.0 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cbf00362beaf86aea7d0481df9e0be5511287fddb583a4e768f5b08bf171a7a4
4
- data.tar.gz: ef35c40a9b3f948b318bc7746f41163ac9b372e4c8d177cc7de3af3cf9fd965f
3
+ metadata.gz: 77b2e807e3bfdf9b203d41a55e4311ef75bf30cf93ad649b29f20e1edd8a1519
4
+ data.tar.gz: d220312bcff98c284b5727a5dabdc1a429cff6d1528b4bbc913e3b4df181364c
5
5
  SHA512:
6
- metadata.gz: 8dc1cf7a06a3fd22c3165633007161303415b9dc18ce54c9f59664b087130745cedab7ae31fb3f3bd0ca25012c6381bde45903f32410fbf13eac9b7e92a0f195
7
- data.tar.gz: 15030d9af29247295cdd221cdb0044b6dd06f67fa740d0ad86d9d717f7380a2c16d0094f688e389ad4ce5bae2bc99bf13f093789a4fb96f10aec4d12b2a3f9e2
6
+ metadata.gz: bc9df6845ccaa0a71d2e8bdb477b5011c4ac89d3c763a3499338a1b818b00e4b4e9140d69f26fd9ab9819295ef58ea32daf0950579b5adc463b069c853b91c3e
7
+ data.tar.gz: 6c2cf6542b310e4b08fcc1b258356d33f291b177bab08b288f5cb435058a526d53e44c1d1462152ad77375558b3cdd07087fd595f6a2ff4cbaa43585e5e3e45e
data/bin/dsu3 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'dsu3'
4
4
 
5
- @net = DSU3::Net.new(*File.readlines(ARGV.shift))
5
+ @net = DSU3::Net.new(*File.readlines(ARGV.shift).map(&:chop))
6
6
 
7
7
  require 'irb'
8
8
  IRB.start
@@ -9,12 +9,11 @@ module DSU3
9
9
  # Verifies the server member
10
10
  # @param [String] token Discord account token
11
11
  # @param [String, Integer] guild Guild ID
12
- # @param [String] invite Invite code
13
- def verify(token, guild, invite)
12
+ def verify(token, guild)
14
13
  DSU3::API.request(
15
14
  token, :get,
16
15
  "guilds/#{guild}/member-verification",
17
- { params: { with_guild: false, invite_code: invite } }
16
+ { params: { with_guild: false } }
18
17
  )
19
18
  end
20
19
  end
data/lib/dsu3/api.rb CHANGED
@@ -42,6 +42,7 @@ module DSU3
42
42
  if e.is_a?(RestClient::TooManyRequests)
43
43
  LOGGER.warn('ratelimit exceeded')
44
44
  elsif e.response.headers[:content_type] == 'application/json'
45
+ data = JSON.parse(e.response.body)
45
46
  LOGGER.error("#{data['code']}: #{data['message']}")
46
47
  else
47
48
  LOGGER.error(e.message)
data/lib/dsu3/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DSU3
4
- VERSION = '0.9.0'
4
+ VERSION = '0.9.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dsu3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artur Sheremetjev IV