bot-eye-leak/src/config/config.js

57 lines
942 B
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const { readdirSync } = require('fs')
const path = require('path')
const ms = require('ms')
const oS = require('os')
const cS = require('chalk')
const config = {}
config.isDev = process.env.NODE_ENV === 'development'
config.consignOpts = {
cwd: process.cwd() + '/src',
extensions: ['.js'],
verbose: false
}
config.limitSecurity = {
window: ms('15s'),
limit: 4,
onLimitExceeded: ({ answerCbQuery }) =>
answerCbQuery('❗Please wait a second !', true)
}
config.i18nOpts = {
directory: path.resolve(__dirname, '../locales'),
defaultLanguage: 'en'
}
config.settings = {
setCommand: async (ctx, next) => {
ctx.setMyCommands([
{
command: 'start',
description: 'Start bot or restart'
},
{
command: 'lang',
description: 'Change language'
},
{
command: 'joke',
description: 'IT GIfs or !joke'
}
])
return next()
}
}
module.exports = {
config,
readdirSync,
path,
ms,
oS,
cS
}