mirror of
https://github.com/onyx-and-iris/q3rcon-cli.git
synced 2026-04-16 22:13:40 +00:00
first commit
This commit is contained in:
19
src/q3rcon_cli/commands/plugins.py
Normal file
19
src/q3rcon_cli/commands/plugins.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from aioq3rcon import Client
|
||||
from clypi import Command, arg
|
||||
from typing_extensions import override
|
||||
|
||||
from q3rcon_cli.console import Console
|
||||
|
||||
|
||||
class Plugins(Command):
|
||||
"""Prints the currently loaded plugins of the server."""
|
||||
|
||||
host: str = arg(inherited=True)
|
||||
port: int = arg(inherited=True)
|
||||
password: str = arg(inherited=True)
|
||||
|
||||
@override
|
||||
async def run(self):
|
||||
async with Client(self.host, self.port, self.password) as client:
|
||||
if response := await client.send_command('plugins'):
|
||||
Console.print_response(response)
|
||||
Reference in New Issue
Block a user