Sfoglia il codice sorgente

move register plugins

blezz-tech 1 mese fa
parent
commit
b6268792f2
1 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 5 5
      handlers/EchoBot.py

+ 5 - 5
handlers/EchoBot.py

@@ -12,17 +12,17 @@ class JabberBot(slixmpp.ClientXMPP):
     def __init__(self, jid, password):
         slixmpp.ClientXMPP.__init__(self, jid, password)
 
-    def run(self):
-        # TODO: Нужно ли
-        # self.send_presence()
-        # self.get_roster()
-
         # Register plugins
         self.register_plugin('xep_0030') # Service Discovery
         self.register_plugin('xep_0004') # Data Forms
         self.register_plugin('xep_0060') # PubSub
         self.register_plugin('xep_0199') # XMPP Ping
 
+    def run(self):
+        # TODO: Нужно ли
+        # self.send_presence()
+        # self.get_roster()
+
         logging.info(f"Bot {self.jid} started!")
 
         # Connect to the XMPP server and start processing XMPP stanzas.