feat: typing indicator
This commit is contained in:
@@ -47,6 +47,12 @@ public struct DiscordClient: Sendable {
|
||||
req.httpBody = try json.encode(payload)
|
||||
try await authReq(req)
|
||||
}
|
||||
|
||||
public func triggerTypingIndicator(channelId: String) async throws {
|
||||
var req = URLRequest(url: DiscordClient.apiUrl.appending(path: "/channels/\(channelId)/typing"))
|
||||
req.httpMethod = "POST"
|
||||
try await authReq(req)
|
||||
}
|
||||
}
|
||||
|
||||
public enum ApiError: Error {
|
||||
|
||||
Reference in New Issue
Block a user