mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-09-01 14:45:27 +00:00
fixed staff admins links
This commit is contained in:
@@ -9,15 +9,7 @@ const { getAdmins } = require('../../stores/user');
|
|||||||
const staffHandler = async ctx => {
|
const staffHandler = async ctx => {
|
||||||
const admins = await getAdmins();
|
const admins = await getAdmins();
|
||||||
|
|
||||||
const links = admins
|
const links = admins.map(link);
|
||||||
// this first .map wouldn't have to be here
|
|
||||||
// if we stored whole user as-is
|
|
||||||
// ie. if id was available as id, not user_id
|
|
||||||
.map(admin => ({
|
|
||||||
first_name: admin.first_name,
|
|
||||||
id: admin.user_id,
|
|
||||||
}))
|
|
||||||
.map(link);
|
|
||||||
|
|
||||||
const list = links.map(s => `⭐ ${s}`).join('\n');
|
const list = links.map(s => `⭐ ${s}`).join('\n');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user