mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-31 06:51:02 +00:00
style: run prettier and eslint
This commit is contained in:
@@ -6,14 +6,10 @@ export default {
|
|||||||
const isAdmin = admins.find((admin) => admin.user.id === cb.from.id);
|
const isAdmin = admins.find((admin) => admin.user.id === cb.from.id);
|
||||||
|
|
||||||
if (!isAdmin)
|
if (!isAdmin)
|
||||||
return bot.sendMessage(
|
return bot.sendMessage(cb.message.chat.id, 'You\'re not an admin.', {
|
||||||
cb.message.chat.id,
|
message_thread_id: cb.message.message_thread_id,
|
||||||
'You\'re not an admin.',
|
reply_to_message_id: cb.message.message_id
|
||||||
{
|
});
|
||||||
message_thread_id: cb.message.message_thread_id,
|
|
||||||
reply_to_message_id: cb.message.message_id
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
helper.sendTrainData(
|
helper.sendTrainData(
|
||||||
cb.message.reply_to_message.text.toLowerCase(),
|
cb.message.reply_to_message.text.toLowerCase(),
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ for (const file of commandFiles) {
|
|||||||
const filePath = join(commandsPath, file);
|
const filePath = join(commandsPath, file);
|
||||||
const command = (await import(`file://${filePath}`)).default;
|
const command = (await import(`file://${filePath}`)).default;
|
||||||
if ('command' in command && 'execute' in command) {
|
if ('command' in command && 'execute' in command) {
|
||||||
bot.onText(command.command, (...args) => command.execute(bot, config, ...args));
|
bot.onText(command.command, (...args) =>
|
||||||
|
command.execute(bot, config, ...args)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
console.log(
|
||||||
`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`
|
`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`
|
||||||
|
|||||||
Reference in New Issue
Block a user