# Path: bot/plugins/base.py
# class BasePlugin(metaclass=BasePluginMeta):
# 
#     has_blocking_io = False  # set to True to run events in an executor
#     commands = None
#     _callbacks = None
# 
#     def __init__(self, client, options):
#         self.client = client
#         self.options = options
# 
#     def _wrap(self, method):
#         handler = functools.partial(method, self)
#         handler.__name__ = method.__name__
#         handler._has_blocking_io = self.has_blocking_io
#         return handler
# 
#     def get_command(self, msg):
#         """
#         Get the command that matches with str:`msg`
#         """
#         for cmd, handler in self.commands.items():
#             if msg.lower().startswith(cmd.lower()):
# 
#                 # Simple command
#                 if handler._command.regex is None:
#                     # in this case, it must be the exact same command
#                     if msg.lower() != cmd.lower():
#                         continue
#                     command = commands.Command(handler._command)
#                     return handler, command
# 
#                 # Regex matching, cut of the command part
#                 str_to_test = msg[len(cmd):].strip()
#                 match = handler._command.regex.match(str_to_test)
#                 if not match:
#                     continue
# 
#                 command = commands.Command(handler._command, **match.groupdict())
#                 return handler, command
#         return None
# 
#     async def on_message(self, message):
#         result = self.get_command(message.content)
#         if result:
#             handler, command = result
#             command.for_message, command.client = message, self.client
#             stop = await command_resolved.dispatch(command=command, handler=handler)
#             if not stop:
#                 assert asyncio.iscoroutinefunction(handler)
#                 await handler(self, command)
# 
#     async def on_message_edit(self, before, after):
#         pass


import logging
from bot.plugins.base import BasePlugin


logger = logging.getLogger(__name__)


class Plugin(BasePlugin):

    async def on_message(self, message):
        channel = getattr(message.channel, 'name', None)
        if channel != 'developer':

# Path: bot/plugins/base.py
# class BasePlugin(metaclass=BasePluginMeta):
# 
#     has_blocking_io = False  # set to True to run events in an executor
#     commands = None
#     _callbacks = None
# 
#     def __init__(self, client, options):
#         self.client = client
#         self.options = options
# 
#     def _wrap(self, method):
#         handler = functools.partial(method, self)
#         handler.__name__ = method.__name__
#         handler._has_blocking_io = self.has_blocking_io
#         return handler
# 
#     def get_command(self, msg):
#         """
#         Get the command that matches with str:`msg`
#         """
#         for cmd, handler in self.commands.items():
#             if msg.lower().startswith(cmd.lower()):
# 
#                 # Simple command
#                 if handler._command.regex is None:
#                     # in this case, it must be the exact same command
#                     if msg.lower() != cmd.lower():
#                         continue
#                     command = commands.Command(handler._command)
#                     return handler, command
# 
#                 # Regex matching, cut of the command part
#                 str_to_test = msg[len(cmd):].strip()
#                 match = handler._command.regex.match(str_to_test)
#                 if not match:
#                     continue
# 
#                 command = commands.Command(handler._command, **match.groupdict())
#                 return handler, command
#         return None
# 
#     async def on_message(self, message):
#         result = self.get_command(message.content)
#         if result:
#             handler, command = result
#             command.for_message, command.client = message, self.client
#             stop = await command_resolved.dispatch(command=command, handler=handler)
#             if not stop:
#                 assert asyncio.iscoroutinefunction(handler)
#                 await handler(self, command)
# 
#     async def on_message_edit(self, before, after):
#         pass


# Path: bot/plugins/test.py
import logging
from bot.plugins.base import BasePlugin



logger = logging.getLogger(__name__)


class Plugin(BasePlugin):

    async def on_message(self, message):
        channel = getattr(message.channel, 'name', None)
        if channel != 'developer':

            return