diff --git a/mod.ts b/mod.ts index 3c632d4..3bbb6ce 100644 --- a/mod.ts +++ b/mod.ts @@ -99,14 +99,17 @@ function toTpReader(redisConn: Deno.Conn): TextProtoReader { * ``` * @param redisConn Redis connection to the server. * @param command Redis command, which is an array of arguments. + * @param echo If `true`, a reply is read. Defaults to true. * @returns Parsed Redis reply */ export async function sendCommand( redisConn: Deno.Conn, command: Command, -): Promise { + echo = true, +): Promise { await writeRequest(redisConn, stringifyRequest(command)); - return await readReply(toTpReader(redisConn)); + if (echo) { + return await readReply(toTpReader(redisConn)); } }