Skip to content

KeirLoire/topwar-chat-spy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TopWar Chat Sync logo
TopWar Chat Spy (TW:CS)
Python logo

About

This script listens from TopWar chat websocket to read real-time chats in the game then sends it to a webhook of a Discord channel.

There are two websockets in the game:

  • The first one is for receiving real-time chats.
    • This is the websocket that we will be using in the script.
  • The second one is for interacting within the game.

Prerequisites

This script requires prerequisites in order to run.

  • Python 3.7.9 or later.

How to setup

  • Run pip install -r requirements.txt to install all dependencies
  • Configuring config.ini
    • [discord_webhooks]
      • main
        • This is where the webhook URL of a Discord channel is stored. You can find more info here.
      • You could add more if you want and use any names as long as it is compliant with INI format.
    • [topwar]
      • websocket
        • The chat websocket. Technically, works for any server, you don't need to change this.
      • uuid
        • The UUID of your TopWar account. Used for saying hi to the websocket before letting you in.
    • [topwar_channels]
      • This is the placeholder for the chat channel IDs of the alliances or servers that you want to listen.
      • You can change these names, they're just names for the channel IDs:
        • world_721
        • alliance_21BC
      • And you could add more channels to listen.
      • The World Chat ID
        • You can get the ID by modifying the format. Simply replace the <server_number> from the format with the server number that you want:
          • Format:
            • 102_1_<server_number>g123
          • Examples:
            • world_1000 = 102_1_1000g123
            • world_721 = 102_1_721g123
      • The Alliance Chat ID
      • You can also spy from other servers and alliances despite your account not being a member of.
  • Run python main.py
  • Leave the script running and notice the chats are being sent to the Discord channel with the webhook you have configured in the script.

If you want the script to end, just press CTRL + C. If that doesn't work, kill it.

How did I get the websockets and alliance ID from the game?

Disclaimer

We are not responsible for any damages or loss upon use of this software.

We strongly discourage any illicit activity and this is for educational purposes only.

Use at your own risk!

About

Sends chats from TopWar to Discord using webhooks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages