···235235}
236236237237fn start_interaction_handler(
238238- state: InteractionHandlerContext,
238238+ context: InteractionHandlerContext,
239239 interaction: Interaction,
240240) -> Result(
241241 actor.Started(process.Subject(InteractionHandlerMessage)),
···251251 // Let's send a message on actor start-up.
252252 process.send(subject, InteractionCreated(interaction))
253253254254- actor.initialised(state)
254254+ actor.initialised(context)
255255 |> actor.returning(subject)
256256 |> actor.selecting(selector)
257257 |> Ok
···261261}
262262263263fn handle_interaction_handler_message(
264264- state: InteractionHandlerContext,
264264+ context: InteractionHandlerContext,
265265 message: InteractionHandlerMessage,
266266) -> actor.Next(InteractionHandlerContext, a) {
267267 // We only deal with one type of message here,
268268 // but the case statement exists for future-proofing.
269269 case message {
270270- InteractionCreated(interaction) -> handle_interaction(state, interaction)
270270+ InteractionCreated(interaction) -> handle_interaction(context, interaction)
271271 }
272272}
273273274274// Finally, we get to handle our interaction.
275275fn handle_interaction(
276276- state: InteractionHandlerContext,
276276+ context: InteractionHandlerContext,
277277 interaction: Interaction,
278278) -> actor.Next(InteractionHandlerContext, a) {
279279 // At this step, you'd:
···283283 // But here, let's skip all that and just immediately respond with "Pong!" to every interaction
284284 // sent to our bot.
285285 let _result =
286286- state.client
286286+ context.client
287287 |> interaction.respond(
288288 to: interaction,
289289 using: interaction.RespondWithChannelMessageWithSource(