parent
b314c70da7
commit
e619c19b36
|
@ -126,7 +126,7 @@ class StateHandler(object):
|
|||
yield new_state
|
||||
self.set_state(new_state)
|
||||
|
||||
def run_message_handler_for_bot(lib_module, quiet, config_file):
|
||||
def run_message_handler_for_bot(lib_module, quiet, config_file, bot_name):
|
||||
# type: (Any, bool, str) -> Any
|
||||
#
|
||||
# lib_module is of type Any, since it can contain any bot's
|
||||
|
@ -135,7 +135,7 @@ def run_message_handler_for_bot(lib_module, quiet, config_file):
|
|||
# function.
|
||||
#
|
||||
# Make sure you set up your ~/.zuliprc
|
||||
client = Client(config_file=config_file)
|
||||
client = Client(config_file=config_file, client="Zulip{}Bot".format(bot_name.capitalize()))
|
||||
restricted_client = ExternalBotHandler(client)
|
||||
|
||||
message_handler = lib_module.handler_class()
|
||||
|
|
|
@ -107,7 +107,8 @@ def main():
|
|||
run_message_handler_for_bot(
|
||||
lib_module=lib_module,
|
||||
config_file=options.config_file,
|
||||
quiet=options.quiet
|
||||
quiet=options.quiet,
|
||||
bot_name=bot_name
|
||||
)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in a new issue