Skip to content

Commit

Permalink
𝙇𝙤𝙡𝙞𝘽𝙤𝙩-𝙈𝘿
Browse files Browse the repository at this point in the history
  • Loading branch information
elrebelde21 authored Aug 22, 2023
1 parent 90215ea commit 85bea7b
Show file tree
Hide file tree
Showing 18 changed files with 5,109 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:lts-buster

RUN apt-get update && \
apt-get install -y \
ffmpeg \
imagemagick \
webp && \
apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/*

COPY package.json .

RUN npm install && npm install qrcode-terminal

COPY . .

EXPOSE 5000

CMD ["node", "index.js"]
Binary file added Menu2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node . --server
18 changes: 18 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "The-LoliBot-MD",
"description": "Super Bot WhatsApp",
"repository": "https://github.com/elrebelde21/The-LoliBot-MD",
"logo": "https://i.imgur.com/8fK4h6F.jpg",
"keywords": ["java", "bot", "whatsapp-bot", "whatsapp-automation"],
"buildpacks": [
{
"url": "heroku/nodejs"
},
{
"url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest"
},
{
"url": "https://github.com/bogini/heroku-buildpack-graphicsmagick"
}
]
}
396 changes: 396 additions & 0 deletions config.js

Large diffs are not rendered by default.

1,527 changes: 1,527 additions & 0 deletions handler.js

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
console.log('Iniciando 🚀🚀🚀')
import { join, dirname } from "path";
import { createRequire } from "module";
import { fileURLToPath } from "url";
import { setupMaster, fork } from "cluster";
import { watchFile, unwatchFile } from "fs";
import cfonts from "cfonts";
import chalk from "chalk";
import { createInterface } from "readline";
import yargs from "yargs";
const __dirname = dirname(fileURLToPath(import.meta.url));
const require = createRequire(__dirname);
const { name, author } = require(join(__dirname, "./package.json"));
const { say } = cfonts;
const rl = createInterface(process.stdin, process.stdout);

say('The Loli\nBot\nMD', {
font: 'chrome',
align: 'center',
gradient: ['red', 'magenta']})
say(`Por LoliBot`, {
font: 'console',
align: 'center',
gradient: ['red', 'magenta']});

var isRunning = false;
/**
* Start a js file
* @param {String} file `path/to/file`
*/
function start(file) {
if (isRunning) return
isRunning = true;
let args = [join(__dirname, file), ...process.argv.slice(2)]

setupMaster({
exec: args[0],
args: args.slice(1),
})
let p = fork()
p.on('message', data => {
console.log('╭--------- - - - ✓\n┆ ✅ TIEMPO DE ACTIVIDAD ACTUALIZADA\n╰-------------------- - - -', data)
switch (data) {
case 'reset':
p.process.kill()
isRunning = false
start.apply(this, arguments)
break
case 'uptime':
p.send(process.uptime())
break
}})
p.on('exit', (_, code) => {
isRunning = false
console.error('⚠️ Error Inesperado ⚠️', code)
if (code === 0) return
watchFile(args[0], () => {
unwatchFile(args[0])
start(file)
})
})
let opts = new Object(yargs(process.argv.slice(2)).exitProcess(false).parse())
if (!opts['test'])
if (!rl.listenerCount()) rl.on('line', line => {
p.emit('message', line.trim())
})
//console.log(p)
}
start('main.js')
334 changes: 334 additions & 0 deletions install.sh

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions koyeb.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM fedora:37

RUN sudo dnf -y update &&\
sudo dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm &&\
sudo dnf install -y git ffmpeg ImageMagick nodejs yarnpkg libwebp &&\
sudo dnf clean all -y

RUN git clone https://github.com/elrebelde21/The-LoliBot-MD

WORKDIR /root/The-LoliBot-MD

COPY ./root/The-LoliBot-MD

RUN yarn install

CMD ["node", "index.js"]
Loading

0 comments on commit 85bea7b

Please sign in to comment.