Responding to "Knock Knock" jokes

KnockKnockSkill

Skill to respond to knock knock jokes

__init__(self) special

Knock Knock Skill Initialization

handle_knockknock_intent(self, message)

Primary function for intent matches. Called by skill manager.

Parameters:
  • message (str) – text that triggered the intent

Returns:
  • (bool) – True on success or False on failure

handle_knockknock_q1(self, message)

Second step in knock knock job (e.g. "VOICE_PROMPT who?").

Parameters:
  • message (str) – The text triggering this step.

Returns:
  • (bool) – True on success or False on failure

handle_knockknock_q2(self, message)

Last step in knock knock job (e.g. the last laugh).

Parameters:
  • message (str) – The text triggering this step.

Returns:
  • (bool) – True on success or False on failure

initialize(self)

Load intent files for Tell Date Time Skill

Returns:
  • (bool) – True on success else raises an exception

stop(self)

Method to stop any daemons created during startup/initialization for this skill.

Returns:
  • (bool) – True on success and False on failure

create_skill()

Method to create the instance of this skill for delivering to the skill manager

Returns:
  • (object) – KnockKnockSkill instantiated class object