diff --git a/Sources/Discord/Models/Channel.swift b/Sources/Discord/Models/Channel.swift index 41cb41db5..682c99794 100644 --- a/Sources/Discord/Models/Channel.swift +++ b/Sources/Discord/Models/Channel.swift @@ -202,6 +202,8 @@ extension Messageable { if let closure = `while` { let task = Task { while true { + do { try Task.checkCancellation() } + catch { break } try await bot!.http.triggerTypingIndicator(channelId: id) // The delay isn't 10s because once it hits the 10s mark, the "is typing"