Closed NikoMobile closed 1 year ago
Hello
I am not sure if I have understood your proposal but maybe you can do something like this:
import types
class MyBot(XmppBot):
@botcmd
def ping(self, *args, **kwargs):
for i in range(5):
yield "pong "+str(i)
def reply_message(self, msg, txt, *args, **kwargs):
if isinstance(txt, types.GeneratorType):
for i in txt:
super().reply_message(msg, i, *args, **kwargs)
else:
super().reply_message(msg, txt, *args, **kwargs)
Hello,
I asked myself if it was possible create commands that would return multiple values and forked then modified your bot code to allow commands to be generators. It may be interesting