mirror of
https://gitlab.com/qwerinope/qweribot.git
synced 2026-02-04 15:06:58 +01:00
add vulnchatters command and add comments
This commit is contained in:
12
bot/commands/vulnchatters.ts
Normal file
12
bot/commands/vulnchatters.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { redis } from "bun";
|
||||
import { Command, sendMessage } from ".";
|
||||
|
||||
export default new Command('vulnchatters',
|
||||
['vulnchatters', 'vulnc'],
|
||||
[],
|
||||
async msg => {
|
||||
const data = await redis.keys('vulnchatters:*');
|
||||
const one = data.length === 1;
|
||||
await sendMessage(`There ${one ? 'is' : 'are'} ${data.length} vulnerable chatter${one ? '' : 's'}`, msg.messageId);
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user