2024-02-14 16:36:12 +01:00
|
|
|
package sway
|
|
|
|
|
2024-02-14 17:21:50 +01:00
|
|
|
// SendTick sends a tick with the given payload
|
2024-02-14 16:48:50 +01:00
|
|
|
func (c *Client) SendTick(payload string) error {
|
2024-02-14 16:36:12 +01:00
|
|
|
result, err := sendMessage[commandResult](c, 10, payload)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
if result.HasError() {
|
|
|
|
return result.GetError()
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|