dispander.rb 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dispander.gemspec +1 -1
- data/lib/dispander/extension.rb +5 -3
- data/lib/dispander/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f3dd993508d1c80b0c3d8bd83e779b241ebd771f8c693e336257ac668ca5ead
|
4
|
+
data.tar.gz: aae722d30c39c63d74ca9c1651fa07c3263a8e720be3301618316a10b2c2d105
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2179d31d91005547550dba1e13bf710183f1f23f74b70457a1ca87fbf807d17a99a0419d22f8c8f7bb84c50ed57cf317379be60dcb5eea7af331353f114bd84
|
7
|
+
data.tar.gz: 9609e9f14e3fb4a39532ed1469698ff648568a14df0f2681f8dabb4d6803d11459dc1e36897bde3918657d455edb350b972b37dea858f80cdd81df99ca1f308e
|
data/dispander.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
30
|
# Uncomment to register a new dependency of your gem
|
31
|
-
spec.add_dependency "discorb", "~> 0.11.
|
31
|
+
spec.add_dependency "discorb", "~> 0.11.3"
|
32
32
|
|
33
33
|
# For more information and examples about making a new gem, checkout our
|
34
34
|
# guide at: https://bundler.io/guides/creating_gem.html
|
data/lib/dispander/extension.rb
CHANGED
@@ -41,8 +41,10 @@ module Dispander
|
|
41
41
|
|
42
42
|
sent_messages = []
|
43
43
|
begin
|
44
|
-
|
45
|
-
|
44
|
+
next unless guild = @client.guilds[guild_id]
|
45
|
+
next unless channel = guild.channels[channel_id] || @client.fetch_channel(channel_id).wait
|
46
|
+
next unless message = channel.fetch_message(message_id).wait
|
47
|
+
rescue Discorb::NotFoundError, NoMethodError
|
46
48
|
next
|
47
49
|
else
|
48
50
|
embed = create_embed_from_message(message)
|
@@ -51,7 +53,7 @@ module Dispander
|
|
51
53
|
embeds += message.attachments[1..]&.filter(&:image?)&.map { |attachment| create_embed_from_attachment(attachment) }.to_a
|
52
54
|
|
53
55
|
until (embeds_send = embeds.slice!(..10)).empty?
|
54
|
-
sent_messages <<
|
56
|
+
sent_messages << base_message.channel.post(embeds: embeds_send).wait
|
55
57
|
end
|
56
58
|
embed.url = "http://a.io/#{base_message.author.id}-#{message.author.id}-#{sent_messages.map(&:id).join(",")}"
|
57
59
|
first_embeds = sent_messages[0].embeds
|
data/lib/dispander/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dispander.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sevenc-nanashi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: discorb
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.11.
|
19
|
+
version: 0.11.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.11.
|
26
|
+
version: 0.11.3
|
27
27
|
description:
|
28
28
|
email:
|
29
29
|
- sevenc-nanashi@sevenbot.jp
|