rubyred 0.2.0.pre.beta1 → 0.2.0.pre.beta3

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: bc87a31fbd387b6906dca405cb5d921226b59826
4
- data.tar.gz: 44c35f3db6a779000d9f61c74e91cd894067f5b3
3
+ metadata.gz: 383ec3a4ffba862962b0632d708000f991845668
4
+ data.tar.gz: 5b6f8bf2f071c3bd01edd254f6406b14467332a2
5
5
  SHA512:
6
- metadata.gz: 5b40ffe0e29b6794883a0bedf6b738cab38fc67acfbda19661d029382119abb9152866b67c5ebfa089014ad47100acb25cd915cdecdf7733bb13fb448af08216
7
- data.tar.gz: f3c09ebdd41654b5c6e7c066b75bf54fe60bfd839b4a043d93ff30a8b41548a33bd55f6428f22b11e86ca07d72948b714e1a459e4bb6e78834d38665d23dbe10
6
+ metadata.gz: fb76a1c49b062421dc310b45bc22f9f9304ffe2e8a5f64bcf183f2c72d4961db031fb0acf71a4ec0e1dd89b916f82eedc935e7f5852b58f8a7d22feba4cf4602
7
+ data.tar.gz: bee6efcd6cdda816cc335ffb419f42bedbbd4dd00dc5a234c9f24d0d596d089799b1f227527c8bdec87ebea9634e7df95cb84ac6856166fd0de19ef690cf896c
@@ -2,8 +2,9 @@
2
2
  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 0.2.0
6
- * Updated RubyRed to no longer have the token/appid hard-coded into the source
7
+ * Added a random DND-style character generator
7
8
 
8
9
  #### Version 0.1.2
9
10
  * Updated the ReadMe to contain the correct minimum tested ruby version
@@ -2,8 +2,8 @@ require 'discordrb'
2
2
 
3
3
  module RubyRed
4
4
 
5
- BOT = Discordrb::Commands::CommandBot.new(token: ENV['RUBYRED_TOKEN'],
6
- application_id: ENV['RUBYRED_APPID'],
5
+ BOT = Discordrb::Commands::CommandBot.new(token: 'MjI3MTM4Nzc1MTk5OTA3ODQw.CsBy_A.xM0Fl1Iz7wv87DV9Y5EQ_zCnf4Q',
6
+ application_id: 227138775199907840,
7
7
  prefix: '!',
8
8
  advanced_functionality: false)
9
9
 
@@ -7,6 +7,7 @@ module RubyRed
7
7
  Dir["#{File.dirname(__FILE__)}/commands/*.rb"].each {|file| require file}
8
8
 
9
9
  @commands = [
10
+ Characterize,
10
11
  Diag,
11
12
  Drink,
12
13
  Ping,
@@ -0,0 +1,21 @@
1
+ module RubyRed
2
+ module Commands
3
+ module Characterize
4
+ require 'yaml'
5
+ # Generates a random character for roleplaying purposes
6
+ #
7
+ # Examples:
8
+ # !characterize
9
+ # 'RubyRed: female dwarven rogue'
10
+ CHARACTER_YAML_FILE = 'lib/rubyred/commands/characterize/attributes.yaml'
11
+ character_data = YAML.load(File.open(CHARACTER_YAML_FILE))
12
+ srand Time.now.to_i
13
+
14
+ extend Discordrb::Commands::CommandContainer
15
+
16
+ command(:characterize, description: 'Generates a random character for roleplaying purposes') do |event|
17
+ "Here's a character idea: a #{character_data["sex"].sample} #{character_data["race"].sample} #{character_data["class"].sample}"
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,19 @@
1
+ race:
2
+ - Elf
3
+ - Dwarf
4
+ - Human
5
+ - Halfing
6
+ - Half-Elf
7
+ - Half-Orc
8
+ - Gnome
9
+ class:
10
+ - Fighter
11
+ - Cleric
12
+ - Barbarian
13
+ - Druid
14
+ - Wizard
15
+ - Sorceror
16
+ - Bard
17
+ sex:
18
+ - Male
19
+ - Female
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.beta1
4
+ version: 0.2.0.pre.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - George Spiceland
@@ -45,6 +45,8 @@ files:
45
45
  - bin/rubyred
46
46
  - lib/rubyred.rb
47
47
  - lib/rubyred/commands.rb
48
+ - lib/rubyred/commands/characterize.rb
49
+ - lib/rubyred/commands/characterize/attributes.yaml
48
50
  - lib/rubyred/commands/diag.rb
49
51
  - lib/rubyred/commands/drink.rb
50
52
  - lib/rubyred/commands/drink/drink.yaml