change to api, making WEB

Signed-off-by: faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2026-07-11 00:44:08 +03:00
1 parent 97dc183bdf
commit e7573fbcd0
6 files changed
+193 -22

No files matched your search

@@ -36,6 +36,45 @@ namespace Echoion::Api
getClients() = 0;
[[nodiscard]] virtual Result<std::optional<ClientInfo>>
getClient(uint64_t clientId) = 0;
// Network address of a client as reported by TeamSpeak
// (CONNECTION_CLIENT_IP). Requires the bot to hold the
// b_client_remoteaddress_view permission; hosts that cannot
// resolve the address return nullopt.
[[nodiscard]] virtual Result<std::optional<std::string>>
getClientIp(uint64_t /*clientId*/)
{
return std::optional<std::string>{};
}
// Local filesystem path of the client's avatar image as cached
// by the TeamSpeak client (getAvatar). The cache is only
// populated for clients the TS client has seen; nullopt when the
// client has no avatar or it is not (yet) downloaded.
[[nodiscard]] virtual Result<std::optional<std::string>>
getClientAvatarPath(uint64_t /*clientId*/)
{
return std::optional<std::string>{};
}
// The client's myTeamSpeak avatar URL, if set. Modern clients store
// their avatar as a public HTTPS URL (CLIENT_MYTS_AVATAR, formatted
// "<version>,<url>") rather than the legacy file-transfer avatar.
// Returns the bare URL, or nullopt when unset/legacy.
[[nodiscard]] virtual Result<std::optional<std::string>>
getClientAvatarUrl(uint64_t /*clientId*/)
{
return std::optional<std::string>{};
}
// Actively fetch a client's avatar from the server into `destDir`
// (used when it isn't in the TS client's own cache — e.g. the
// client is not in view). Returns the local path once the file is
// present; returns nullopt when the client has no avatar or the
// download was just triggered and hasn't finished yet (a later
// call returns the path). Downloads run asynchronously.
[[nodiscard]] virtual Result<std::optional<std::string>>
requestClientAvatar(uint64_t /*clientId*/,
const std::string& /*destDir*/)
{
return std::optional<std::string>{};
}
virtual Result<void> moveClient(uint64_t clientId,
uint64_t channelId) = 0;
virtual Result<void> kickClient(uint64_t clientId,