refactor: methods for mute/unmute chat added

This commit is contained in:
Sale Djenic 2021-12-07 15:17:17 +01:00 committed by saledjenic
parent 2fab5ae9c4
commit bfac7c57e1
1 changed files with 9 additions and 1 deletions

View File

@ -63,4 +63,12 @@ proc sendImages*(chatId: string, images: var seq[string]): RpcResponse[JsonNode]
"text": "Update to latest version to see a nice image here!"
}
)
callPrivateRPC("sendChatMessages".prefix, %* [imagesJson])
callPrivateRPC("sendChatMessages".prefix, %* [imagesJson])
proc muteChat*(chatId: string): RpcResponse[JsonNode] {.raises: [Exception].} =
let payload = %* [chatId]
result = callPrivateRPC("muteChat".prefix, payload)
proc unmuteChat*(chatId: string): RpcResponse[JsonNode] {.raises: [Exception].} =
let payload = %* [chatId]
result = callPrivateRPC("unmuteChat".prefix, payload)