from motobot import match, Notice, Eat, __VERSION__
from time import strftime, localtime


@match(r'\x01(.+)\x01', priority=Priority.max)
def ctcp_match(bot, context, message, match):
    mapping = {
        'VERSION': 'MotoBot Version ' + __VERSION__,
        'FINGER': 'Oh you dirty man!',
        'TIME': strftime('%a %b %d %H:%M:%S', localtime()),
        'PING': message
    }
    try:
        ctcp_req = match.group(1)
        reply = ctcp_response[ctcp_req]
        return reply, Notice(context.nick), Eat
    except KeyError:
        return None

from motobot import match, Notice, Eat, Priority, __VERSION__
from time import strftime, localtime


@match(r'\x01(.+)\x01', priority=Priority.max)
def ctcp_match(bot, context, message, match):
    ctcp_response = {
        'VERSION': 'MotoBot Version ' + __VERSION__,
        'FINGER': 'Oh you dirty man!',
        'TIME': strftime('%a %b %d %H:%M:%S', localtime()),
        'PING': message
    }
    try:
        ctcp_req = match.group(1)
        reply = ctcp_response[ctcp_req]
        return reply, Notice(context.nick), Eat
    except KeyError:
        return None

Fix CTCP import and naming bug
Fix CTCP import and naming bug

- from motobot import match, Notice, Eat, __VERSION__
+ from motobot import match, Notice, Eat, Priority, __VERSION__
  from time import strftime, localtime
  
  
  @match(r'\x01(.+)\x01', priority=Priority.max)
  def ctcp_match(bot, context, message, match):
-     mapping = {
+     ctcp_response = {
          'VERSION': 'MotoBot Version ' + __VERSION__,
          'FINGER': 'Oh you dirty man!',
          'TIME': strftime('%a %b %d %H:%M:%S', localtime()),
          'PING': message
      }
      try:
          ctcp_req = match.group(1)
          reply = ctcp_response[ctcp_req]
          return reply, Notice(context.nick), Eat
      except KeyError:
          return None
  
Fix CTCP import and naming bug
## Code Before:
from motobot import match, Notice, Eat, __VERSION__
from time import strftime, localtime


@match(r'\x01(.+)\x01', priority=Priority.max)
def ctcp_match(bot, context, message, match):
    mapping = {
        'VERSION': 'MotoBot Version ' + __VERSION__,
        'FINGER': 'Oh you dirty man!',
        'TIME': strftime('%a %b %d %H:%M:%S', localtime()),
        'PING': message
    }
    try:
        ctcp_req = match.group(1)
        reply = ctcp_response[ctcp_req]
        return reply, Notice(context.nick), Eat
    except KeyError:
        return None

## Instruction:
Fix CTCP import and naming bug
## Code After:
from motobot import match, Notice, Eat, Priority, __VERSION__
from time import strftime, localtime


@match(r'\x01(.+)\x01', priority=Priority.max)
def ctcp_match(bot, context, message, match):
    ctcp_response = {
        'VERSION': 'MotoBot Version ' + __VERSION__,
        'FINGER': 'Oh you dirty man!',
        'TIME': strftime('%a %b %d %H:%M:%S', localtime()),
        'PING': message
    }
    try:
        ctcp_req = match.group(1)
        reply = ctcp_response[ctcp_req]
        return reply, Notice(context.nick), Eat
    except KeyError:
        return None
