Answer the question
In order to leave comments, you need to log in
How to create an admin array for a telegram?
For example, there is this code:
bot.command('start', (ctx) => {
const options = {
inline: false,
duplicates: false,
newline: false,
};
const keyboard = new Keyboard(options);
keyboard
.add(' /Help ', '✔️ /Tos ✔️', '❓ /Methods ❓')
ctx.reply('Open Started Menu!', keyboard.draw());
})
bot.command('clear', async (ctx) => {
var args = ctx.message.text.split(' ');
args.shift()
console.log(' host: ' + args[0] + ' port: ' + args[1] + ' time: ' + args[2] + ' method: ' +args[3])
Answer the question
In order to leave comments, you need to log in
if I understand correctly, then
let admin = ['1232', '32434']
const checkadmin = admin.find(u => u.admin === тут ид пользователей, хз какие они у тебя)
if (checkadmin)
// admin
} else {
// no admin
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question