* Creates a terminal reply context that interrupts the supplied request. * * @stability unstable * @since 4.0.0
(options: {
readonly id: Snowflake
readonly requestId: Snowflake
})
| 121 | * @since 4.0.0 |
| 122 | */ |
| 123 | static interrupt(options: { |
| 124 | readonly id: Snowflake |
| 125 | readonly requestId: Snowflake |
| 126 | }): ReplyWithContext<any> { |
| 127 | return new ReplyWithContext({ |
| 128 | reply: new WithExit({ |
| 129 | requestId: options.requestId, |
| 130 | id: options.id, |
| 131 | exit: Exit.interrupt() |
| 132 | }), |
| 133 | context: Context.empty() as any, |
| 134 | rpc: neverRpc |
| 135 | }) |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | const neverRpc = Rpc.make("Never", { |
no outgoing calls