Пример #1
0
        def friends():
            friends = Connection.friendshipRequest("friends",
                                                   {}).get("friends")

            Common.printNotificationText(f"Friends: {len(friends)}")

            for friend in friends:
                Common.printNotificationText(friend)
Пример #2
0
        def outgoing():
            outgoing = Connection.friendshipRequest("outgoing",
                                                    {}).get("outgoing")

            Common.printNotificationText(
                f"Ougoing Friendship Requests: {len(outgoing)}")

            for username in outgoing:
                Common.printNotificationText(username)
Пример #3
0
        def incoming():
            incoming = Connection.friendshipRequest("incoming",
                                                    {}).get("incoming")

            Common.printNotificationText(
                f"Incoming Friendship Requests: {len(incoming)}")

            for username in incoming:
                Common.printNotificationText(username)
Пример #4
0
    def helpCommand(**kwargs):
        from .commandConfig import CommandConfig

        controllerName = kwargs.get("controller").__name__

        commonCommands = CommandConfig.getCommonCommands()
        privateCommands = CommandConfig.getSpecialCommands(controllerName)

        for command, value in commonCommands.items():
            Common.printNotificationText(
                f"{command} -> {value.get('description')}")

        for command, value in privateCommands.items():
            Common.printNotificationText(
                f"{command} -> {value.get('description')}")
Пример #5
0
        def read():
            response = Connection.notificationRequest("read", {})
            notifications = response.get("notifications")

            Common.printNotificationText("Notifications:\n")

            for notification in notifications:
                if notification.get("content") is None:
                    continue

                notificationId = notification.get("id")
                date = notification.get("date")
                content = notification.get("content")

                Common.printNotificationText(
                    f"id -> {notificationId}\ndate -> {date}\ncontent -> {content}\n"
                )
Пример #6
0
        def whoami():
            response = Connection.profileRequest("whoami", {}).get("whoami")

            Common.printNotificationText(
                f"Username -> {response.get('username')}\nEmail -> {response.get('email')}"
            )