rubyred 0.2.0 → 1.0.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: f072142e4797db33c78ad06fc433f98a084e89e4
4
- data.tar.gz: 1f1457b847a55a8e70085411361e09d84dd790b9
3
+ metadata.gz: 01189a58d6658738198e0003f82556832f80eabb
4
+ data.tar.gz: c189cc61c19d840726dd6dd13ef39fd31ce04d7d
5
5
  SHA512:
6
- metadata.gz: c5121c032f379c6edc9925bda3c41c956afff0d57addb232f67cd3fdf1f665b5ed15ba0676d9f12f75b8c2990d6a592c52e6e06a9ec187ecb6e291ada79e8a56
7
- data.tar.gz: 84c48aa125f83de3a3ea97cbc90cea60979112e5810c6e6e38a1c959a2a6e7ab8864c96f6dbcbe3a8c3cbb07d001fa81be3b03e50e1c8c2d2b783c48c3bd4c04
6
+ metadata.gz: 454592b6d726af998d18ba0f91e80915128a180281e4eb16916284d5580d340b3171668e9b56f3a074b0e853eb70d189ff7913e3838f3cf468ce4e755ecd6732
7
+ data.tar.gz: b82cef1d47be2439b89c8a8c58fd5c0bb43320493c8a2b523b6d082ebb6803e755f0a0d42725a5bff02c8c04357d2a30e8f17c12d2964456fd71e468bf5b1139
@@ -3,6 +3,11 @@ Information on semver can be found [here](http://semver.org)
3
3
  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
+ #### Version 1.0.0
7
+ * Added support for Discordrb v3.0.1
8
+ * Fixed several bugs related to the "lulz limiter"
9
+ * Fixed an issue where lulz related loops could occur.
10
+
6
11
  #### Version 0.2.0
7
12
  * Updated RubyRed to no longer have the token/appid hard-coded into the source
8
13
  * Fixed the bug from issue #22 where RubyRed laughed too often
@@ -3,18 +3,18 @@ require 'discordrb'
3
3
  module RubyRed
4
4
 
5
5
  BOT = Discordrb::Commands::CommandBot.new(token: ENV['RUBYRED_TOKEN'],
6
- application_id: ENV['RUBYRED_APPID'],
6
+ client_id: ENV['RUBYRED_CLIENTID'],
7
7
  prefix: '!',
8
8
  advanced_functionality: false)
9
9
 
10
10
  Dir["#{File.dirname(__FILE__)}/rubyred/*.rb"].each {|file| require file}
11
11
 
12
- Discordrb::LOGGER = LOGGER = RubyRed::Console.new
12
+ Discordrb::LOGGER = BOTLOG = RubyRed::Console.new
13
13
 
14
14
  Commands.include!
15
15
 
16
- LOGGER.info "OAuth url: #{BOT.invite_url}+&permissions=0x00000C00"
17
- LOGGER.info "Use ctrl+c to stop the bot."
16
+ BOTLOG.info "OAuth url: #{BOT.invite_url}+&permissions=0x00000C00"
17
+ BOTLOG.info "Use ctrl+c to stop the bot."
18
18
 
19
19
  def self.run
20
20
  BOT.run
@@ -6,6 +6,17 @@ race:
6
6
  - Half-Elf
7
7
  - Half-Orc
8
8
  - Gnome
9
+ - Orc
10
+ - Lizardman
11
+ - Catman
12
+ - Dragonkin
13
+ - Kobald
14
+ - Drow
15
+ - Troll
16
+ - Goblin
17
+ - Centaur
18
+ - Fae
19
+ - Golem
9
20
  class:
10
21
  - Fighter
11
22
  - Cleric
@@ -14,6 +25,20 @@ class:
14
25
  - Wizard
15
26
  - Sorceror
16
27
  - Bard
28
+ - Monk
29
+ - Pirate
30
+ - Assassin
31
+ - Rogue
32
+ - Ranger
33
+ - Archer
34
+ - Pyromancer
35
+ - Paladin
36
+ - Knight
37
+ - Duelist
38
+ - Necromancer
39
+ - Monster Tamer
40
+ - Hunter
17
41
  sex:
18
42
  - Male
19
- - Female
43
+ - Female
44
+ - Androgynous
@@ -2,6 +2,7 @@ module RubyRed
2
2
  module Events
3
3
  module Lulz
4
4
  require 'yaml'
5
+ require_relative 'lulz/lulz_helper'
5
6
 
6
7
  LULZ_YAML_FILE = 'lib/rubyred/events/lulz/lulz.yaml'
7
8
  lulz_data = YAML.load(File.open(LULZ_YAML_FILE))
@@ -10,18 +11,10 @@ module RubyRed
10
11
 
11
12
  srand Time.now.to_i
12
13
 
13
- if (rand(1..3)) == 1
14
- will_lul = true
15
- else
16
- will_lul = false
17
- end
18
-
19
-
20
14
  extend Discordrb::EventContainer
21
- #TODO: Add more combinations of different things here to respond to
22
- BOT.message(contains: lulz_triggers) do |event|
23
- #TODO: Add more possible responses
24
- if will_lul
15
+ BOT.message(contains: lulz_triggers, from: not!(["RubyRed", "RubyTest"])) do |event|
16
+
17
+ if self.will_lul?
25
18
  event.send_message("#{lulz_responses.sample} #{event.author.username}")
26
19
  end
27
20
  end
@@ -0,0 +1,15 @@
1
+ module RubyRed
2
+ module Events
3
+ module Lulz
4
+ def self.will_lul?
5
+ srand Time.now.to_i
6
+ if (rand(1..3)) == 1
7
+ will_lul = true
8
+ else
9
+ will_lul = false
10
+ end
11
+ return will_lul
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module RubyRed
2
- VERSION = '0.2.0'
2
+ VERSION = '1.0.0'
3
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
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - George Spiceland
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.1'
19
+ version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 2.1.3
22
+ version: 3.0.1
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: '2.1'
29
+ version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 2.1.3
32
+ version: 3.0.1
33
33
  description: RubyRed is a Ruby based Discord bot using DiscordRB
34
34
  email:
35
35
  - george@vallenwood.com
@@ -59,6 +59,7 @@ files:
59
59
  - lib/rubyred/events.rb
60
60
  - lib/rubyred/events/lulz.rb
61
61
  - lib/rubyred/events/lulz/lulz.yaml
62
+ - lib/rubyred/events/lulz/lulz_helper.rb
62
63
  - lib/rubyred/version.rb
63
64
  homepage: http://rubygems.org/gems/rubyred
64
65
  licenses: