@@ -26,7 +26,6 @@ package ackcord.gateway
26
26
import ackcord .data ._
27
27
import ackcord .data .raw ._
28
28
import ackcord .util .{IntCirceEnumWithUnknown , JsonOption , JsonSome , JsonUndefined }
29
- import akka .NotUsed
30
29
import cats .{Eval , Later , Now }
31
30
import enumeratum .values .{IntEnum , IntEnumEntry }
32
31
import io .circe .Decoder .Result
@@ -225,9 +224,9 @@ case class Resume(nowD: ResumeData, gatewayInfo: GatewayInfo)
225
224
/**
226
225
* Sent by the gateway to indicate that the shard should reconnect.
227
226
*/
228
- case class Reconnect (gatewayInfo : GatewayInfo ) extends EagerGatewayMessage [NotUsed ] with ServerGatewayMessage [NotUsed ] {
227
+ case class Reconnect (gatewayInfo : GatewayInfo ) extends EagerGatewayMessage [Unit ] with ServerGatewayMessage [Unit ] {
229
228
override def op : GatewayOpCode = GatewayOpCode .Reconnect
230
- override def nowD : NotUsed = NotUsed
229
+ override def nowD : Unit = ()
231
230
}
232
231
233
232
/**
@@ -286,20 +285,18 @@ case class Hello(nowD: HelloData, gatewayInfo: GatewayInfo)
286
285
/**
287
286
* Sent by the gateway as a response to [[Heartbeat ]].
288
287
*/
289
- case class HeartbeatACK (gatewayInfo : GatewayInfo )
290
- extends EagerGatewayMessage [NotUsed ]
291
- with ServerGatewayMessage [NotUsed ] {
288
+ case class HeartbeatACK (gatewayInfo : GatewayInfo ) extends EagerGatewayMessage [Unit ] with ServerGatewayMessage [Unit ] {
292
289
override def op : GatewayOpCode = GatewayOpCode .HeartbeatACK
293
- override def nowD : NotUsed = NotUsed
290
+ override def nowD : Unit = ()
294
291
}
295
292
296
293
/**
297
294
* All unknown gateway messages.
298
295
*/
299
296
case class UnknownGatewayMessage (op : GatewayOpCode , gatewayInfo : GatewayInfo )
300
- extends EagerGatewayMessage [NotUsed ]
301
- with ServerGatewayMessage [NotUsed ] {
302
- override def nowD : NotUsed = NotUsed
297
+ extends EagerGatewayMessage [Unit ]
298
+ with ServerGatewayMessage [Unit ] {
299
+ override def nowD : Unit = ()
303
300
}
304
301
305
302
/**
@@ -387,10 +384,10 @@ object GatewayEvent {
387
384
/**
388
385
* Sent to the shard when a previously interrupted connection is resumed.
389
386
*/
390
- case class Resumed (rawData : Json ) extends GatewayEvent [NotUsed ] {
387
+ case class Resumed (rawData : Json ) extends GatewayEvent [Unit ] {
391
388
override def name : String = " RESUMED"
392
389
393
- override def data : Later [Result [NotUsed ]] = Later (Right (NotUsed ))
390
+ override def data : Later [Result [Unit ]] = Later (Right (() ))
394
391
}
395
392
396
393
/**
@@ -1035,8 +1032,8 @@ object GatewayEvent {
1035
1032
) {
1036
1033
1037
1034
def reparse [A : Decoder ]: Result [A ] = {
1038
- import GatewayProtocol ._
1039
1035
import io .circe .syntax ._
1036
+ import GatewayProtocol ._
1040
1037
val self : SimpleRawInteraction = this
1041
1038
self.asJson.as[A ]
1042
1039
}
@@ -1059,8 +1056,8 @@ object GatewayEvent {
1059
1056
) {
1060
1057
1061
1058
def reparse [A : Decoder ]: Decoder .Result [A ] = {
1062
- import GatewayProtocol ._
1063
1059
import io .circe .syntax ._
1060
+ import GatewayProtocol ._
1064
1061
val self : SimpleApplicationCommandWithGuildId = this
1065
1062
self.asJson.as[A ]
1066
1063
}
0 commit comments