from pyheufybot.module_interface import Module, ModulePriority, ModuleType

class ModuleSpawner(Module):
    def __init__(self, bot):
        self.bot = bot
        self.name = "Say"
        self.trigger = "say"
        self.moduleType = ModuleType.COMMAND
        self.modulePriotity = ModulePriority.NORMAL
        self.messageTypes = ["PRIVMSG"]
        self.helpText = "Usage: say <message> | Makes the bot say the given line."

    def execute(self, message):
        if len(message.params) == 1:
            self.bot.msg(message.replyTo, "Say what?")
        else:
            self.bot.msg(message.replyTo, " ".join(message.params[1:]))
        return True

from pyheufybot.module_interface import Module, ModulePriority, ModuleType

class ModuleSpawner(Module):
    def __init__(self, bot):
        self.bot = bot
        self.name = "Say"
        self.trigger = "say|sayremote"
        self.moduleType = ModuleType.COMMAND
        self.modulePriority = ModulePriority.NORMAL
        self.messageTypes = ["PRIVMSG"]
        self.helpText = "Usage: say <message>/sayremote <target> <message>  | Makes the bot say the given line."

    def execute(self, message):
        if message.params[0].lower() == "say":
            if len(message.params) == 1:
                self.bot.msg(message.replyTo, "Say what?")
            else:
                self.bot.msg(message.replyTo, " ".join(message.params[1:]))
        elif message.params[0].lower() == "sayremote":
            if len(message.params) < 3:
                self.bot.msg(message.replyTo, "Say what?")
            else:
                self.bot.msg(message.params[1], " ".join(message.params[2:]))
        return True

Add a remote option to Say
Add a remote option to Say

  from pyheufybot.module_interface import Module, ModulePriority, ModuleType
  
  class ModuleSpawner(Module):
      def __init__(self, bot):
          self.bot = bot
          self.name = "Say"
-         self.trigger = "say"
+         self.trigger = "say|sayremote"
          self.moduleType = ModuleType.COMMAND
-         self.modulePriotity = ModulePriority.NORMAL
+         self.modulePriority = ModulePriority.NORMAL
          self.messageTypes = ["PRIVMSG"]
-         self.helpText = "Usage: say <message> | Makes the bot say the given line."
+         self.helpText = "Usage: say <message>/sayremote <target> <message>  | Makes the bot say the given line."
  
      def execute(self, message):
+         if message.params[0].lower() == "say":
-         if len(message.params) == 1:
+             if len(message.params) == 1:
-             self.bot.msg(message.replyTo, "Say what?")
+                 self.bot.msg(message.replyTo, "Say what?")
-         else:
+             else:
-             self.bot.msg(message.replyTo, " ".join(message.params[1:]))
+                 self.bot.msg(message.replyTo, " ".join(message.params[1:]))
+         elif message.params[0].lower() == "sayremote":
+             if len(message.params) < 3:
+                 self.bot.msg(message.replyTo, "Say what?")
+             else:
+                 self.bot.msg(message.params[1], " ".join(message.params[2:]))
          return True
  
Add a remote option to Say
## Code Before:
from pyheufybot.module_interface import Module, ModulePriority, ModuleType

class ModuleSpawner(Module):
    def __init__(self, bot):
        self.bot = bot
        self.name = "Say"
        self.trigger = "say"
        self.moduleType = ModuleType.COMMAND
        self.modulePriotity = ModulePriority.NORMAL
        self.messageTypes = ["PRIVMSG"]
        self.helpText = "Usage: say <message> | Makes the bot say the given line."

    def execute(self, message):
        if len(message.params) == 1:
            self.bot.msg(message.replyTo, "Say what?")
        else:
            self.bot.msg(message.replyTo, " ".join(message.params[1:]))
        return True

## Instruction:
Add a remote option to Say
## Code After:
from pyheufybot.module_interface import Module, ModulePriority, ModuleType

class ModuleSpawner(Module):
    def __init__(self, bot):
        self.bot = bot
        self.name = "Say"
        self.trigger = "say|sayremote"
        self.moduleType = ModuleType.COMMAND
        self.modulePriority = ModulePriority.NORMAL
        self.messageTypes = ["PRIVMSG"]
        self.helpText = "Usage: say <message>/sayremote <target> <message>  | Makes the bot say the given line."

    def execute(self, message):
        if message.params[0].lower() == "say":
            if len(message.params) == 1:
                self.bot.msg(message.replyTo, "Say what?")
            else:
                self.bot.msg(message.replyTo, " ".join(message.params[1:]))
        elif message.params[0].lower() == "sayremote":
            if len(message.params) < 3:
                self.bot.msg(message.replyTo, "Say what?")
            else:
                self.bot.msg(message.params[1], " ".join(message.params[2:]))
        return True
