mirror of
https://gitlab.com/qwerinope/qweribot.git
synced 2026-02-04 15:06:58 +01:00
add admin powers
This commit is contained in:
13
bot/commands/getadmins.ts
Normal file
13
bot/commands/getadmins.ts
Normal 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);
|
||||
Reference in New Issue
Block a user