コード例 #1
0
ファイル: core.py プロジェクト: golu701/jetski
    def on_resumed(self, event):
        Notification.dispatch(
            Notification.Types.RESUME,
            env=ENV,
        )

        with self.send_control_message() as embed:
            embed.title = 'Resumed'
            embed.color = 0xffb347
            embed.add_field(name='Replayed Events', value=str(self.client.gw.replayed_events))
コード例 #2
0
ファイル: core.py プロジェクト: ItsDoot/rowboat
    def on_resumed(self, event):
        Notification.dispatch(
            Notification.Types.RESUME,
            trace=event.trace,
            env=ENV,
        )

        with self.send_control_message() as embed:
            embed.title = 'Resumed'
            embed.color = 0xffb347
            embed.add_field(name='Gateway Server', value=event.trace[0], inline=False)
            embed.add_field(name='Session Server', value=event.trace[1], inline=False)
            embed.add_field(name='Replayed Events', value=str(self.client.gw.replayed_events))
コード例 #3
0
ファイル: core.py プロジェクト: TrissieTheHusky/speedboat
    def on_ready(self, event):
        reconnects = self.client.gw.reconnects
        self.log.info('Started session %s', event.session_id)
        Notification.dispatch(
            Notification.Types.CONNECT,
            env=ENV,
        )

        with self.send_control_message() as embed:
            if reconnects:
                embed.title = 'Reconnected'
                embed.color = 0xffb347
            else:
                embed.title = 'Connected'
                embed.color = 0x77dd77
コード例 #4
0
ファイル: core.py プロジェクト: LostLuma/jetski
    def on_ready(self, event):
        reconnects = self.client.gw.reconnects
        self.log.info('Started session %s', event.session_id)
        Notification.dispatch(
            Notification.Types.CONNECT,
            env=ENV,
        )

        with self.send_control_message() as embed:
            if reconnects:
                embed.title = 'Reconnected'
                embed.color = 0xffb347
            else:
                embed.title = 'Connected'
                embed.color = 0x77dd77

            embed.add_field(name='Gateway Version', value='v{}'.format(event.version), inline=False)
            embed.add_field(name='Session ID', value=event.session_id, inline=False)
コード例 #5
0
ファイル: core.py プロジェクト: OGNova/airplane
    def on_ready(self, event):
        reconnects = self.client.gw.reconnects
        self.log.info('Started session %s', event.session_id)
        Notification.dispatch(
            Notification.Types.CONNECT,
            trace=event.trace,
            env=ENV,
        )

        with self.send_launch_message() as embed:
            if reconnects:
                embed.title = 'Reconnected'
                embed.color = 0xffb347
            else:
                embed.title = 'Connected'
                embed.color = 0x77dd77

            embed.add_field(name='Gateway Server',
                            value=event.trace[0],
                            inline=False)
            embed.add_field(name='Session Server',
                            value=event.trace[1],
                            inline=False)