botemon 0.4.5 → 0.5
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/bin/botemon +6 -0
- data/lib/botemon/itemdex.rb +24 -0
- data/lib/botemon/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3b56c95f333103edb8be7d5cc68226beca1eba3
|
4
|
+
data.tar.gz: c8c3751315617756ba6b2f707c634ec773cf3b4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4496312bdd718b5c6456ddfcc9a79aaac8a2bee2c023138d8feb018bf3b40e073da73cddc49d993ecb1bfa19eb0fefc9fc2239cc1732906d650f4428cc579d0b
|
7
|
+
data.tar.gz: daf9da00f449e4266b8ad481c53df1f61509a7d4405ba469230bd3793be30d28abd8128eb0b0d13165412bbe4323c1d1afb948514ea82db2dd48be5e599d34b2
|
data/bin/botemon
CHANGED
@@ -57,6 +57,12 @@ Cinch::Bot.new {
|
|
57
57
|
m.reply ability ? "#{ability.to_s}\n#{ability.url}".split("\n").map { |l| Format(:red, l) }.join("\n") : Format(:red, 'Ability not found.')
|
58
58
|
end
|
59
59
|
|
60
|
+
on :message, /^item (.+)/ do |m, name|
|
61
|
+
item = Itemdex.get name
|
62
|
+
|
63
|
+
m.reply item ? "#{item.to_s}\n#{item.url}".split("\n").map { |l| Format(:red, l) }.join("\n") : Format(:red, 'Item not found.')
|
64
|
+
end
|
65
|
+
|
60
66
|
on :message, /^move (.+)/ do |m, name|
|
61
67
|
name = Smogon::Pokemon.id2name(name) if name.numeric?
|
62
68
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright(C) 2013 Giovanni Capuano <webmaster@giovannicapuano.net>
|
3
|
+
#
|
4
|
+
# This file is part of Botémon.
|
5
|
+
#
|
6
|
+
# Botémon is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
9
|
+
# (at your option) any later version.
|
10
|
+
#
|
11
|
+
# Botémon is distributed in the hope that it will be useful,
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
# GNU General Public License for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU General Public License
|
17
|
+
# along with Botémon. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
#++
|
19
|
+
|
20
|
+
class Itemdex
|
21
|
+
def self.get(name)
|
22
|
+
return name ? Smogon::Itemdex.get(name) : nil
|
23
|
+
end
|
24
|
+
end
|
data/lib/botemon/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: botemon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.5'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Giovanni Capuano
|
@@ -89,6 +89,7 @@ extensions: []
|
|
89
89
|
extra_rdoc_files: []
|
90
90
|
files:
|
91
91
|
- lib/botemon/abilitydex.rb
|
92
|
+
- lib/botemon/itemdex.rb
|
92
93
|
- lib/botemon/movedex.rb
|
93
94
|
- lib/botemon/movesetdex.rb
|
94
95
|
- lib/botemon/pokedex.rb
|