add admin powers

This commit is contained in:
2025-06-27 14:31:20 +02:00
parent a4199b45d1
commit c960ae49bf
7 changed files with 92 additions and 17 deletions

13
bot/commands/getadmins.ts Normal file
View File

@@ -0,0 +1,13 @@
import { Command, sendMessage } from ".";
import { getAdmins } from "../lib/admins";
import { User } from "../user";
export default new Command('getadmins', ['getadmins'], [], async msg => {
const admins = await getAdmins()
const adminnames: string[] = [];
for (const id of admins) {
const admin = await User.initUserId(id);
adminnames.push(admin?.displayName!);
};
await sendMessage(`Current admins: ${adminnames.join(', ')}`, msg.messageId);
}, false);