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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6856a31e61787948958aa2469dfa36cf4224b3b5798ee598d8b91bae1b8762ef
4
- data.tar.gz: c8f3b78fe320e7e83171b25b62b075127eb310d81fec68eb86dc69d2fb0cc375
3
+ metadata.gz: c738a695c6df886cd61bc63c885cda625b0e6ad55adf1c761120ba8345d5f927
4
+ data.tar.gz: f4a6b0ff94e6969581e431304720491c7c8a5ca9698d6244851446d51918baf5
5
5
  SHA512:
6
- metadata.gz: 84f36615725df03d6538aaafed8b5ce379d99c237ee3053b0f24799050d870cd434c67a08192517f2109cf49f6e6293db4543c0f040097ee81ca3da89d1a4cc8
7
- data.tar.gz: c3d49c4f06d6a9de51fac152a1a5fae3e42e78e0824e66620ec687b2810cb55de992a468fb9c849120f3323934c6ce0ca9ed31e56fdfe22aaf704031fc84fa57
6
+ metadata.gz: 3faca24468908ec92b858e0546ac470291aac337515fc8b5ae7f206d72fa71e990b7ccb98a34f6ff3524df0a0db0a7f213e9aa752202fcc8fffb470d042130dd
7
+ data.tar.gz: 44ce837e1a70eafb8d718568fbb689c15c885867a797259e8ef9a4262205f2c5567efa16188a68e41ae677e74a167ad7e0874f0bde60764352aed0cb7672cc85
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- discorb (0.0.3)
4
+ discorb (0.0.4)
5
5
  async
6
6
  async-http
7
7
  async-websocket
@@ -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.3"
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
 
@@ -490,9 +490,9 @@ module Discorb
490
490
  @guild_id = nil
491
491
  end
492
492
 
493
- if data[:author].nil? && data[:webhook_id]
493
+ if data[:member].nil? && data[:webhook_id]
494
494
  @webhook_id = Snowflake.new(data[:webhook_id])
495
- # @author = WebhookAuthor.new(data[:webhook_id])
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
@@ -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.3
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-28 00:00:00.000000000 Z
11
+ date: 2021-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async