chat_sdk-discord 0.4.0 → 0.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5278fc2a7c7b2abd395d346a18c875bcead9aefb1ab4dceb231e4af073118cc
4
- data.tar.gz: 458821ec7c94570b34d587020318234b91505aa11a2dd81145e9f03704c986d8
3
+ metadata.gz: e915045ed20b416f3e22acb6eeeda3310d72c2e1cb77473bfc258f9ad8a6b4db
4
+ data.tar.gz: a8076931f75e9ab8a80a827e1f1ff8df60e0ae73495128f413c741336b8f9b9f
5
5
  SHA512:
6
- metadata.gz: d2a7d22dc13bcd30a3fd1dcae07847297518bef581d99cd5387d9e712269d73494357b0508109c4b758437e28bf78619cf18988c77453aeb32d4a8ef882f59a9
7
- data.tar.gz: f4df9c079de22e5494236d3b2f19caa476ce9b94aa877a94aa3926c97afe3464b90596ae7bafaaa66be2116bfff5ea0fe3d3f16177beefd308092acb6cbddc22
6
+ metadata.gz: b483c30b3d080b80833cb369949abcd7bc7aa6052608b652e9202757f56598527251f87b2c0421328611521a7e2fb94d159b7c8e4f6dd0df8b48342fffb92587
7
+ data.tar.gz: 037de90729fd37fb70228fb87426926c3c54c33a455bf6d9eab49327b97859325efae5f47be1dc189fbbe9ba7b00324976121f0274a629d4a400cc0aee6f47cd
@@ -4,7 +4,8 @@ module ChatSDK
4
4
  module Discord
5
5
  class Adapter < ChatSDK::Adapter::Base
6
6
  capabilities :edit_messages, :delete_messages, :reactions, :file_uploads,
7
- :threads, :direct_messages, :message_history, :streaming_edit
7
+ :threads, :direct_messages, :message_history, :streaming_edit,
8
+ :typing_indicator
8
9
 
9
10
  attr_reader :client
10
11
 
@@ -132,6 +133,10 @@ module ChatSDK
132
133
  [messages, next_cursor]
133
134
  end
134
135
 
136
+ def start_typing(channel_id:, thread_id: nil)
137
+ @client.trigger_typing(channel_id)
138
+ end
139
+
135
140
  def mention(user_id)
136
141
  "<@#{user_id}>"
137
142
  end
@@ -56,6 +56,11 @@ module ChatSDK
56
56
  request(:get, path)
57
57
  end
58
58
 
59
+ # Typing indicator
60
+ def trigger_typing(channel_id)
61
+ request(:post, "#{API_PREFIX}/channels/#{channel_id}/typing")
62
+ end
63
+
59
64
  # File upload
60
65
  def upload_file(channel_id, io, filename)
61
66
  payload = {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chat_sdk-discord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Quentin Rousseau