From ad751cdad7afa958270ce3e06167956fc7b15870 Mon Sep 17 00:00:00 2001 From: Luna Date: Sat, 20 Jul 2019 13:21:32 -0300 Subject: [PATCH] pubsub.guild: only pass flags when required --- litecord/pubsub/guild.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/litecord/pubsub/guild.py b/litecord/pubsub/guild.py index 54d77e4..aef55cc 100644 --- a/litecord/pubsub/guild.py +++ b/litecord/pubsub/guild.py @@ -54,8 +54,14 @@ class GuildDispatcher(DispatcherWithFlags): log.debug('sending raw action {!r} to chan={}', action, chan_id) + # for now, only sub() has support for flags. + # it is an idea to have flags support for other actions + args = [] + if action == 'sub': + args.append(flags) + await self.main_dispatcher.action( - 'channel', action, chan_id, user_id, flags + 'channel', action, chan_id, user_id, *args ) async def _chan_call(self, meth: str, guild_id: int, *args):