Migrated everything to dotenvx + edited .gitignore
This commit is contained in:
parent
4269700b66
commit
9944b67edd
6 changed files with 7 additions and 12 deletions
|
@ -1,4 +1,3 @@
|
|||
const Config = require('../props/config.json');
|
||||
const { getStrings } = require('../plugins/checklang.js');
|
||||
const { isOnSpamWatch } = require('../plugins/lib-spamwatch/spamwatch.js');
|
||||
const spamwatchMiddleware = require('../plugins/lib-spamwatch/Middleware.js')(isOnSpamWatch);
|
||||
|
@ -10,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 = Config.admins.includes(adminId);
|
||||
const onCrew = process.env.botAdmins.includes(adminId);
|
||||
|
||||
return { Strings, chatId, userId, isAdmin, onCrew };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue