add !members, fix typescript

This commit is contained in:
Ryan Cao 2022-05-22 12:49:25 +08:00
parent 1c94cf15b5
commit 1908a4f79e
No known key found for this signature in database
GPG key ID: 528A2C1B6656B97F
3 changed files with 22 additions and 4 deletions

View file

@ -80,9 +80,26 @@ We probably can't fully fix this. If you find out which mod is causing this, tel
'!eta': async (c, e) => {
await e.reply('Sometime');
},
'!members': async (c, e) => {
const mems = await e.guild?.members.fetch().then((r) => r.toJSON());
if (!mems) return;
await e.reply({
embeds: [
{
title: `${mems.length} total members!`,
description: `${
mems.filter((m) => m.presence?.status === 'online').length
} online members`,
color: 'GOLD',
},
],
});
},
};
export const aliases = {
export const aliases: { [a: string]: string } = {
'!curse': '!cursed',
'!curseforge': '!cursed',
'!diff': '!why',