discorb 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/discorb/common.rb +1 -1
- data/lib/discorb/message.rb +2 -2
- data/lib/discorb/webhook.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c738a695c6df886cd61bc63c885cda625b0e6ad55adf1c761120ba8345d5f927
|
4
|
+
data.tar.gz: f4a6b0ff94e6969581e431304720491c7c8a5ca9698d6244851446d51918baf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3faca24468908ec92b858e0546ac470291aac337515fc8b5ae7f206d72fa71e990b7ccb98a34f6ff3524df0a0db0a7f213e9aa752202fcc8fffb470d042130dd
|
7
|
+
data.tar.gz: 44ce837e1a70eafb8d718568fbb689c15c885867a797259e8ef9a4262205f2c5567efa16188a68e41ae677e74a167ad7e0874f0bde60764352aed0cb7672cc85
|
data/Gemfile.lock
CHANGED
data/lib/discorb/common.rb
CHANGED
@@ -4,7 +4,7 @@ module Discorb
|
|
4
4
|
# @return [String] The API base URL.
|
5
5
|
API_BASE_URL = "https://discord.com/api/v9"
|
6
6
|
# @return [String] The version of discorb.
|
7
|
-
VERSION = "0.0.
|
7
|
+
VERSION = "0.0.4"
|
8
8
|
# @return [String] The user agent for the bot.
|
9
9
|
USER_AGENT = "DiscordBot (https://github.com/discorb-lib/discorb #{VERSION}) Ruby/#{RUBY_VERSION}"
|
10
10
|
|
data/lib/discorb/message.rb
CHANGED
@@ -490,9 +490,9 @@ module Discorb
|
|
490
490
|
@guild_id = nil
|
491
491
|
end
|
492
492
|
|
493
|
-
if data[:
|
493
|
+
if data[:member].nil? && data[:webhook_id]
|
494
494
|
@webhook_id = Snowflake.new(data[:webhook_id])
|
495
|
-
|
495
|
+
@author = Webhook::Message::Author.new(data[:author])
|
496
496
|
elsif data[:guild_id].nil? || data[:guild_id].empty?
|
497
497
|
@author = @client.users[data[:author][:id]] || User.new(@client, data[:author])
|
498
498
|
else
|
data/lib/discorb/webhook.rb
CHANGED
@@ -362,6 +362,7 @@ module Discorb
|
|
362
362
|
# @return [Boolean] Whether the author is a bot.
|
363
363
|
# @note This will be always `true`.
|
364
364
|
attr_reader :bot
|
365
|
+
alias bot? bot
|
365
366
|
# @return [Discorb::Snowflake] The ID of the author.
|
366
367
|
attr_reader :id
|
367
368
|
# @return [String] The name of the author.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: discorb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
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-08-
|
11
|
+
date: 2021-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|