descartes 0.8.4.3 → 0.8.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/descartes/modules/crunchyroll.rb +18 -5
- data/lib/descartes/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc541ba0901931e76a95d38945d20ccd9ed8e12c
|
4
|
+
data.tar.gz: 11f8ce67c552d041b3276f70d98135b0c3b997b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1db9aee1cf767d353022b928013fbc7ca9a1b7e958891a20d9e8cfa45c6a20bb8d1e7680b67353d93d9d9097ee340e5f3d4f58831e1bed7d46f1c997d674b1df
|
7
|
+
data.tar.gz: 525396d303548c628c2106e04f26c4875f2806f806a173020891fa090072ecb03d093e1b076e8f3df0bc44c9c8da17dc6e623a6469c615a18c9e00d68765a96b
|
@@ -19,19 +19,32 @@ class Descartes
|
|
19
19
|
class Crunchybot
|
20
20
|
include Cinch::Plugin
|
21
21
|
|
22
|
-
match
|
22
|
+
match /^\.cr$/, use_prefix: false, method: :today
|
23
23
|
def today(m)
|
24
24
|
crunchyroll = Crunchyroll.today
|
25
|
-
|
26
|
-
|
25
|
+
|
26
|
+
aired = crunchyroll.select { |h| h[:airs] == :aired }.map { |r| r[:title].colorize }.flatten.join(', ')[0..-2]
|
27
|
+
tomorrow = crunchyroll.select { |h| h[:airs] == :tomorrow }
|
28
|
+
today = crunchyroll.select { |h| h[:airs] == :today }
|
27
29
|
|
28
30
|
m.reply "Gli anime di oggi su #{'Crunchyroll'.colorize}:"
|
29
31
|
|
30
|
-
|
32
|
+
today.each { |series|
|
31
33
|
m.reply "#{series[:title].colorize} (tra #{series[:left].to_ita.colorize})"
|
32
34
|
}
|
35
|
+
|
36
|
+
m.reply '' if today.any?
|
37
|
+
|
38
|
+
if tomorrow.any?
|
39
|
+
m.reply "Domani trasmetterà (per via del fuso):"
|
40
|
+
tomorrow.each { |series|
|
41
|
+
m.reply "#{series[:title].colorize} (tra #{series[:left].to_ita.colorize})"
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
m.reply '' if tomorrow.any?
|
33
46
|
|
34
|
-
m.reply "Sono stati già trasmessi: #{
|
47
|
+
m.reply "Sono stati già trasmessi: #{aired}." unless aired.empty?
|
35
48
|
end
|
36
49
|
|
37
50
|
match /\.cr (.+)/, use_prefix: false, method: :get
|
data/lib/descartes/version.rb
CHANGED