This commit is contained in:
deathbybandaid 2022-02-12 11:50:44 -05:00
parent d215eff24e
commit fd43b7aea6
4 changed files with 8 additions and 1 deletions

View File

@ -32,11 +32,12 @@ class Commands():
bot.nick,
":%s %s %s : %s %s" % (trigger.hostmask, "PRIVMSG", trigger.sender, "ACTION", message)
)
# TODO possible extra space in front of ACTION
bot.dispatch(pretrigger)
def dispatch_nickname_command(self, bot, trigger, message):
pretrigger = PreTrigger(
bot.nick,
":%s %s %s : %s %s" % (trigger.hostmask, "PRIVMSG", trigger.sender, bot.nick, message)
":%s %s %s :%s %s" % (trigger.hostmask, "PRIVMSG", trigger.sender, bot.nick, message)
)
bot.dispatch(pretrigger)

View File

@ -11,3 +11,5 @@ from sopel_SpiceBot_Core_Prerun import prerun_action_command
@plugin.action_command('test')
def sb_test_commands(bot, trigger):
bot.say("%s" % trigger.raw)
bot.say("%s" % trigger.args[1])

View File

@ -12,6 +12,8 @@ from sopel_SpiceBot_Core_Prerun import prerun_command
def commands_test(bot, trigger):
bot.say("%s" % trigger.raw)
bot.say("%s" % trigger.args[1])
@prerun_command()
@plugin.command('testa')

View File

@ -12,6 +12,8 @@ from sopel_SpiceBot_Core_Prerun import prerun_nickname_command
def sb_test_commands(bot, trigger):
bot.say("%s" % trigger.raw)
bot.say("%s" % trigger.args[1])
@prerun_nickname_command()
@plugin.nickname_command('commands')