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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/rubyred.rb +4 -4
- data/lib/rubyred/commands/characterize/attributes.yaml +26 -1
- data/lib/rubyred/events/lulz.rb +4 -11
- data/lib/rubyred/events/lulz/lulz_helper.rb +15 -0
- data/lib/rubyred/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01189a58d6658738198e0003f82556832f80eabb
|
4
|
+
data.tar.gz: c189cc61c19d840726dd6dd13ef39fd31ce04d7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 454592b6d726af998d18ba0f91e80915128a180281e4eb16916284d5580d340b3171668e9b56f3a074b0e853eb70d189ff7913e3838f3cf468ce4e755ecd6732
|
7
|
+
data.tar.gz: b82cef1d47be2439b89c8a8c58fd5c0bb43320493c8a2b523b6d082ebb6803e755f0a0d42725a5bff02c8c04357d2a30e8f17c12d2964456fd71e468bf5b1139
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/lib/rubyred.rb
CHANGED
@@ -3,18 +3,18 @@ require 'discordrb'
|
|
3
3
|
module RubyRed
|
4
4
|
|
5
5
|
BOT = Discordrb::Commands::CommandBot.new(token: ENV['RUBYRED_TOKEN'],
|
6
|
-
|
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 =
|
12
|
+
Discordrb::LOGGER = BOTLOG = RubyRed::Console.new
|
13
13
|
|
14
14
|
Commands.include!
|
15
15
|
|
16
|
-
|
17
|
-
|
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
|
data/lib/rubyred/events/lulz.rb
CHANGED
@@ -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
|
-
|
22
|
-
|
23
|
-
|
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
|
data/lib/rubyred/version.rb
CHANGED
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.
|
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: '
|
19
|
+
version: '3'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
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: '
|
29
|
+
version: '3'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
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:
|