import { Command, sendMessage } from "lib/commandUtils";
import { redis } from "lib/redis";

export default new Command({
	name: "vulnchatters",
	aliases: ["vulnchatters", "vulnc", "vc"],
	usertype: "chatter",
	execution: async (msg) => {
		const data = await redis.keys("user:*:vulnerable");
		const one = data.length === 1;
		await sendMessage(
			`There ${one ? "is" : "are"} ${data.length} vulnerable chatter${one ? "" : "s"}`,
			msg.messageId,
		);
	},
});
