rubyred 0.2.0.pre.beta3 → 0.2.0
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/rubyred.rb +2 -2
- data/lib/rubyred/commands.rb +2 -1
- data/lib/rubyred/commands/version.rb +21 -0
- data/lib/rubyred/events/lulz.rb +11 -1
- data/lib/rubyred/version.rb +3 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f072142e4797db33c78ad06fc433f98a084e89e4
|
4
|
+
data.tar.gz: 1f1457b847a55a8e70085411361e09d84dd790b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5121c032f379c6edc9925bda3c41c956afff0d57addb232f67cd3fdf1f665b5ed15ba0676d9f12f75b8c2990d6a592c52e6e06a9ec187ecb6e291ada79e8a56
|
7
|
+
data.tar.gz: 84c48aa125f83de3a3ea97cbc90cea60979112e5810c6e6e38a1c959a2a6e7ab8864c96f6dbcbe3a8c3cbb07d001fa81be3b03e50e1c8c2d2b783c48c3bd4c04
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,11 @@ The Changelog file reads "Top to Bottom" in chronological order, newest
|
|
4
4
|
versions are on top, oldest are towards the end of the file.
|
5
5
|
|
6
6
|
#### Version 0.2.0
|
7
|
+
* Updated RubyRed to no longer have the token/appid hard-coded into the source
|
8
|
+
* Fixed the bug from issue #22 where RubyRed laughed too often
|
9
|
+
* Added a version command to display the current codebase
|
10
|
+
* Added a more conventional version tracking location
|
11
|
+
* Updated gemspec to use the conventional version tracking mechanism
|
7
12
|
* Added a random DND-style character generator
|
8
13
|
|
9
14
|
#### Version 0.1.2
|
data/lib/rubyred.rb
CHANGED
@@ -2,8 +2,8 @@ require 'discordrb'
|
|
2
2
|
|
3
3
|
module RubyRed
|
4
4
|
|
5
|
-
BOT = Discordrb::Commands::CommandBot.new(token: '
|
6
|
-
application_id:
|
5
|
+
BOT = Discordrb::Commands::CommandBot.new(token: ENV['RUBYRED_TOKEN'],
|
6
|
+
application_id: ENV['RUBYRED_APPID'],
|
7
7
|
prefix: '!',
|
8
8
|
advanced_functionality: false)
|
9
9
|
|
data/lib/rubyred/commands.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
module RubyRed
|
2
|
+
module Commands
|
3
|
+
module Version
|
4
|
+
|
5
|
+
ver_humanizer = 'I am current running '
|
6
|
+
|
7
|
+
# Provides the version of code RubyRed is running on currently
|
8
|
+
#
|
9
|
+
# Examples:
|
10
|
+
# !rules
|
11
|
+
# 'Rubyred: I am current running v0.1.3'
|
12
|
+
|
13
|
+
extend Discordrb::Commands::CommandContainer
|
14
|
+
|
15
|
+
command(:version, description: 'Provides the current running version of the codebase') do |event|
|
16
|
+
"#{ver_humanizer}#{RubyRed::VERSION}"
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/rubyred/events/lulz.rb
CHANGED
@@ -7,13 +7,23 @@ module RubyRed
|
|
7
7
|
lulz_data = YAML.load(File.open(LULZ_YAML_FILE))
|
8
8
|
lulz_triggers = lulz_data["triggers"]
|
9
9
|
lulz_responses = lulz_data["responses"]
|
10
|
+
|
10
11
|
srand Time.now.to_i
|
11
12
|
|
13
|
+
if (rand(1..3)) == 1
|
14
|
+
will_lul = true
|
15
|
+
else
|
16
|
+
will_lul = false
|
17
|
+
end
|
18
|
+
|
19
|
+
|
12
20
|
extend Discordrb::EventContainer
|
13
21
|
#TODO: Add more combinations of different things here to respond to
|
14
22
|
BOT.message(contains: lulz_triggers) do |event|
|
15
23
|
#TODO: Add more possible responses
|
16
|
-
|
24
|
+
if will_lul
|
25
|
+
event.send_message("#{lulz_responses.sample} #{event.author.username}")
|
26
|
+
end
|
17
27
|
end
|
18
28
|
end
|
19
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyred
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- George Spiceland
|
@@ -54,10 +54,12 @@ files:
|
|
54
54
|
- lib/rubyred/commands/ping.rb
|
55
55
|
- lib/rubyred/commands/pug.rb
|
56
56
|
- lib/rubyred/commands/pug/pug_helper.rb
|
57
|
+
- lib/rubyred/commands/version.rb
|
57
58
|
- lib/rubyred/console.rb
|
58
59
|
- lib/rubyred/events.rb
|
59
60
|
- lib/rubyred/events/lulz.rb
|
60
61
|
- lib/rubyred/events/lulz/lulz.yaml
|
62
|
+
- lib/rubyred/version.rb
|
61
63
|
homepage: http://rubygems.org/gems/rubyred
|
62
64
|
licenses:
|
63
65
|
- MPL-2.0
|
@@ -73,9 +75,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
73
75
|
version: '0'
|
74
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
77
|
requirements:
|
76
|
-
- - "
|
78
|
+
- - ">="
|
77
79
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
80
|
+
version: '0'
|
79
81
|
requirements: []
|
80
82
|
rubyforge_project:
|
81
83
|
rubygems_version: 2.5.1
|