From e73b964f45761b2064cfce5545710fa704a2f81a Mon Sep 17 00:00:00 2001 From: Thorsten Date: Sat, 24 Jun 2023 21:01:01 +0200 Subject: [PATCH] fix meta plugin --- distbot/plugins/plugin_help.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/distbot/plugins/plugin_help.py b/distbot/plugins/plugin_help.py index fd5aad1..7974454 100644 --- a/distbot/plugins/plugin_help.py +++ b/distbot/plugins/plugin_help.py @@ -28,16 +28,13 @@ class Plugins(Worker): plugin_storage = {} reverse_lookup = {} - def __init__(self, actionqueue, queue=""): - super(Plugins, self).__init__(actionqueue, queue) + def init_channel(self): + super().init_channel() self.channel.exchange_declare(exchange='plugin_exc', exchange_type='fanout') - - def run(self): result = self.channel.queue_declare(exclusive=True, queue=self.queue) plugin_queue = result.method.queue self.channel.queue_bind(exchange='plugin_exc', queue=plugin_queue) self.channel.basic_consume(queue='plugin_registry', on_message_callback=self.callback_plugins) - super(Plugins, self).run() def callback_plugins(self, ch, method, properties, body): body = json.loads(body.decode("utf-8")) -- 2.39.2