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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 383ec3a4ffba862962b0632d708000f991845668
4
- data.tar.gz: 5b6f8bf2f071c3bd01edd254f6406b14467332a2
3
+ metadata.gz: f072142e4797db33c78ad06fc433f98a084e89e4
4
+ data.tar.gz: 1f1457b847a55a8e70085411361e09d84dd790b9
5
5
  SHA512:
6
- metadata.gz: fb76a1c49b062421dc310b45bc22f9f9304ffe2e8a5f64bcf183f2c72d4961db031fb0acf71a4ec0e1dd89b916f82eedc935e7f5852b58f8a7d22feba4cf4602
7
- data.tar.gz: bee6efcd6cdda816cc335ffb419f42bedbbd4dd00dc5a234c9f24d0d596d089799b1f227527c8bdec87ebea9634e7df95cb84ac6856166fd0de19ef690cf896c
6
+ metadata.gz: c5121c032f379c6edc9925bda3c41c956afff0d57addb232f67cd3fdf1f665b5ed15ba0676d9f12f75b8c2990d6a592c52e6e06a9ec187ecb6e291ada79e8a56
7
+ data.tar.gz: 84c48aa125f83de3a3ea97cbc90cea60979112e5810c6e6e38a1c959a2a6e7ab8864c96f6dbcbe3a8c3cbb07d001fa81be3b03e50e1c8c2d2b783c48c3bd4c04
@@ -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
@@ -2,8 +2,8 @@ require 'discordrb'
2
2
 
3
3
  module RubyRed
4
4
 
5
- BOT = Discordrb::Commands::CommandBot.new(token: 'MjI3MTM4Nzc1MTk5OTA3ODQw.CsBy_A.xM0Fl1Iz7wv87DV9Y5EQ_zCnf4Q',
6
- application_id: 227138775199907840,
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
 
@@ -11,7 +11,8 @@ module RubyRed
11
11
  Diag,
12
12
  Drink,
13
13
  Ping,
14
- Pug
14
+ Pug,
15
+ Version
15
16
  ]
16
17
 
17
18
  def self.include!
@@ -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
@@ -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
- event.send_message("#{lulz_responses.sample} #{event.author.username}")
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
@@ -0,0 +1,3 @@
1
+ module RubyRed
2
+ VERSION = '0.2.0'
3
+ 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.pre.beta3
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: 1.3.1
80
+ version: '0'
79
81
  requirements: []
80
82
  rubyforge_project:
81
83
  rubygems_version: 2.5.1