Fixed bot admin handling + modified README
This commit is contained in:
parent
9944b67edd
commit
33f76fd806
4 changed files with 16 additions and 19 deletions
|
@ -9,7 +9,7 @@ async function collectInfo(ctx) {
|
|||
const userId = parseInt(ctx.message.text.split(' ')[1], 10);
|
||||
const admins = await ctx.telegram.getChatAdministrators(chatId);
|
||||
const isAdmin = admins.some(admin => admin.user.id === adminId);
|
||||
const onCrew = process.env.botAdmins.includes(adminId);
|
||||
const onCrew = JSON.parse("[" + process.env.botAdmins + "]");
|
||||
|
||||
return { Strings, chatId, userId, isAdmin, onCrew };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue