discordrb 1.3.12 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of discordrb might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Rakefile +4 -0
- data/bin/console +3 -3
- data/discordrb.gemspec +14 -14
- data/examples/commands.rb +8 -8
- data/examples/ping.rb +3 -3
- data/examples/pm_send.rb +2 -2
- data/lib/discordrb.rb +1 -0
- data/lib/discordrb/api.rb +34 -8
- data/lib/discordrb/bot.rb +126 -18
- data/lib/discordrb/commands/command_bot.rb +19 -5
- data/lib/discordrb/data.rb +272 -39
- data/lib/discordrb/events/generic.rb +5 -1
- data/lib/discordrb/events/guilds.rb +56 -0
- data/lib/discordrb/games.rb +6 -4
- data/lib/discordrb/games_list.rb +1 -306
- data/lib/discordrb/permissions.rb +29 -3
- data/lib/discordrb/version.rb +1 -1
- data/util/update_lists.rb +20 -2
- metadata +3 -2
data/lib/discordrb/version.rb
CHANGED
data/util/update_lists.rb
CHANGED
@@ -1,2 +1,20 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require 'open-uri'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
# Thanks to abalabahaha for hosting this continually-updating version of the Discord games list.
|
5
|
+
GAMES_LIST_URL = 'https://abal.moe/Discord/JSON/games.json'
|
6
|
+
GAMES_LIST_FILE_PATH = 'lib/discordrb/games_list.rb'
|
7
|
+
|
8
|
+
raw_json = open(GAMES_LIST_URL).read
|
9
|
+
puts "Loaded #{raw_json.length} bytes from #{GAMES_LIST_URL}"
|
10
|
+
|
11
|
+
parsed = JSON.parse(raw_json)
|
12
|
+
puts "Loaded #{parsed.length} games"
|
13
|
+
|
14
|
+
list = "module Discordrb::Games
|
15
|
+
@raw_games = #{parsed}
|
16
|
+
end
|
17
|
+
"
|
18
|
+
|
19
|
+
File.write(GAMES_LIST_FILE_PATH, list)
|
20
|
+
puts "Successfully wrote games list to #{GAMES_LIST_FILE_PATH}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: discordrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- meew0
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faye-websocket
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- lib/discordrb/events/guild_role_create.rb
|
118
118
|
- lib/discordrb/events/guild_role_delete.rb
|
119
119
|
- lib/discordrb/events/guild_role_update.rb
|
120
|
+
- lib/discordrb/events/guilds.rb
|
120
121
|
- lib/discordrb/events/lifetime.rb
|
121
122
|
- lib/discordrb/events/members.rb
|
122
123
|
- lib/discordrb/events/message.rb
|