from module_interface import Module, ModuleType

class Say(Module):
    def __init__(self):
        self.trigger = "say"
        self.moduleType = ModuleType.ACTIVE
        self.messagesTypes = ["PRIVMSG"]
        self.helpText = "Usage: say <message> | Makes the bot say the given line"

    def execute(self, message, serverInfo):
        pass

from module_interface import Module, ModuleType
from message import IRCResponse, ResponseType

class Say(Module):
    def __init__(self):
        self.trigger = "say"
        self.moduleType = ModuleType.ACTIVE
        self.messagesTypes = ["PRIVMSG"]
        self.helpText = "Usage: say <message> | Makes the bot say the given line"

    def execute(self, message, serverInfo):
        return [ IRCResponse(message.replyTo, ResponseType.MESSAGE, message.messageText) ]

Make it possible for modules to send a response
Make it possible for modules to send a response

  from module_interface import Module, ModuleType
+ from message import IRCResponse, ResponseType
  
  class Say(Module):
      def __init__(self):
          self.trigger = "say"
          self.moduleType = ModuleType.ACTIVE
          self.messagesTypes = ["PRIVMSG"]
          self.helpText = "Usage: say <message> | Makes the bot say the given line"
  
      def execute(self, message, serverInfo):
-         pass
+         return [ IRCResponse(message.replyTo, ResponseType.MESSAGE, message.messageText) ]
  
Make it possible for modules to send a response
## Code Before:
from module_interface import Module, ModuleType

class Say(Module):
    def __init__(self):
        self.trigger = "say"
        self.moduleType = ModuleType.ACTIVE
        self.messagesTypes = ["PRIVMSG"]
        self.helpText = "Usage: say <message> | Makes the bot say the given line"

    def execute(self, message, serverInfo):
        pass

## Instruction:
Make it possible for modules to send a response
## Code After:
from module_interface import Module, ModuleType
from message import IRCResponse, ResponseType

class Say(Module):
    def __init__(self):
        self.trigger = "say"
        self.moduleType = ModuleType.ACTIVE
        self.messagesTypes = ["PRIVMSG"]
        self.helpText = "Usage: say <message> | Makes the bot say the given line"

    def execute(self, message, serverInfo):
        return [ IRCResponse(message.replyTo, ResponseType.MESSAGE, message.messageText) ]
