Skip to content

hks27d/PythonDiscordServerStatus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

📌 Discord server status

Monitor the player count and current map of your Counter-Strike GO/2 server and display this information as your Discord application's status. This project is written in Python, utilizing the discord.py and python-a2s libraries. Feel free to modify the code to suit your specific requirements.

📗 Dependencies

  • Python >= 3.13.5
  • discord.py >= 2.5.2
  • python-a2s >= 1.4.1

🎁 Main characteristics

  • Pythonic code style
  • Code linted with Ruff (a Rust-powered VS Code extension)
  • No useless memory allocations
  • Minimal terminal output
  • Rotating logging handler for exceptions
  • Consistent logging template for Discord client runtime
  • Graceful exits with status code 1 for critical failures

🔵 Code changes

To configure general settings of the application:

  • TOKEN = "" - Replace the string value with your Discord application token
  • SERVER_IPv4 = "0.0.0.0" - Replace the string value with the server's IPv4 address
  • SERVER_PORT = 27015 - Replace the numeric value with the server's port

🟠 Other code changes

  • OFFLINE_STATUS = "Server unreachable" - Application status when the server is unreachable
  • UPDATE_INTERVAL_SECONDS = 60 - Application updates frequency for status in seconds

Caution

  • Ensure the UPDATE_INTERVAL_SECONDS value is set to 60 or greater.
  • In case of application startup issues, a code refactoring may be necessary.

🤝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

⭐ Show Your Support

Star this project if it helped you.

📝 License

MIT.

About

Counter-Strike GO/2 discord application for server status (players and map)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages