Skip to content

Commit

Permalink
adding all project logic
Browse files Browse the repository at this point in the history
  • Loading branch information
OSintt committed Jul 10, 2024
1 parent 2bbbce1 commit 99ec7a3
Show file tree
Hide file tree
Showing 18 changed files with 328 additions and 173 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@neondatabase/serverless": "^0.9.4",
"@rodrigogs/xvideos": "^1.3.0",
"axios": "^1.7.2",
"discord-webhook-node": "^1.1.8",
"dotenv": "^16.4.5",
"drizzle-orm": "^0.31.4",
"puppeteer": "^22.12.1"
Expand Down
21 changes: 21 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/config/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { config } from 'dotenv';
config();

export const DatabaseConfig = {
dbUrl: process.env.DATABASE_URL as string
};

export const CdnConfig = {
cdnUrl: process.env.CND_URL as string,
}
8 changes: 8 additions & 0 deletions src/database/dbClient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { neon } from '@neondatabase/serverless';
import { drizzle } from 'drizzle-orm/neon-http';

import { DatabaseConfig } from '../config/config';

const db = drizzle(neon(DatabaseConfig.dbUrl));

export default db;
15 changes: 2 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
import { getVideos } from "./services/getVideos";
import { getVideos } from "./services/videosService";

const runGetVideos = async () => {
try {
await getVideos();
} catch (error) {
console.error("Error in getVideos:", error);
}

// Llamar a la función nuevamente después de que se complete
setTimeout(runGetVideos, 0);
};

runGetVideos();
getVideos();
130 changes: 130 additions & 0 deletions src/jsons/girls.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
[
{
"name": "Daniela 🍓",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257092623261237308/432889137_441981384946590_1527129978413301309_n.png?ex=6683263d&is=6681d4bd&hm=9172612bafb7c50f778122cc763d9de0315d554cf45af6784b1f12aaafab9e87&=&format=webp&quality=lossless&width=662&height=662"
},
{
"name": "Ximena 😈",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257117154378121256/2_JS296597445.png?ex=66833d15&is=6681eb95&hm=aa7e2f5d82dbc3c5b54f93ab447884c5f49f143aa74c4d6e9b41e4f9534d895d&=&format=webp&quality=lossless&width=386&height=437"
},
{
"name": "Marcianita 🥰",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257117187089633371/fans-top.png?ex=66833d1d&is=6681eb9d&hm=6264a98ecb88dcca225f4f12c3b518f40171715d370356f47ee1722ed1ac8543&=&format=webp&quality=lossless&width=881&height=587"
},
{
"name": "Fer 🙈",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257117249580564584/images.png?ex=66833d2c&is=6681ebac&hm=bffbe57fdd4c927487839f90d6c6b24296563953fe4fc31852493f670b366dbf&=&format=webp&quality=lossless&width=281&height=280"
},
{
"name": "Isabella ❤️‍🔥",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257117314818641951/Snapinsta-app_327167239_1421996155330576_2952491947825490116_n_1080.png?ex=66833d3b&is=6681ebbb&hm=aeaf45e7a23bbefaeac679abd8051ac373c13c1ac28e7b9eaefa3f953e4dff44&=&format=webp&quality=lossless&width=350&height=437"
},
{
"name": "Canaria 💋",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257117340236124160/7347cd7630504861bc5b56cc0e198b11_md.png?ex=66833d42&is=6681ebc2&hm=5e55bf95bb0ac9d68b4a6310cbdd4e7c9721ab34ce34eb631aad4b7e2d86e959&=&format=webp&quality=lossless&width=582&height=437"
},
{
"name": "Alicia 🫦",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257117396330745866/0_PAY-Its-really-offensive-OnlyFans-model-is-KICKED-OUT-of-26000-holiday-home-after-sharing-sexy-p.png?ex=66833d4f&is=6681ebcf&hm=fd51fef2f5dc2889e6da1cf583543b4124bae8057a61402262de16bcc874ffc6&=&format=webp&quality=lossless&width=291&height=437"
},
{
"name": "Almita 🍑",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257117425510383706/mercedes.png?ex=66833d56&is=6681ebd6&hm=c34c5dbc0fbb1d59b513cd042d0c19c7cea899aac6b277e6fe2787644be11b9c&=&format=webp&quality=lossless&width=438&height=437"
},
{
"name": "Bridgette 💦",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257117446016598026/mercedes1.png?ex=66833d5b&is=6681ebdb&hm=d56a70c0cebfa0b384affd74a8c56baf75fb8c9727e832ac2a419d666dedb646&=&format=webp&quality=lossless&width=438&height=437"
},
{
"name": "Alisson 🥛",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257117517986660453/Sun_Instagram_image_download_null_184102.png?ex=66833d6c&is=6681ebec&hm=5e09758413f900ed86b55c9b5df2cdd9578f7f40feaf9512747074921596ec24&=&format=webp&quality=lossless&width=353&height=437"
},
{
"name": "Mei ❤️",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257117588647972915/ab8cb350-4828-11ed-beff-d50264dd8abe.png?ex=66833d7d&is=6681ebfd&hm=24cb24d43bdd79ed1e84bf7edb0b2d70fca5509496325eb075c09c8b42ccfaca&=&format=webp&quality=lossless&width=350&height=437"
},
{
"name": "Fifi 💕",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257117608977895494/0_I-swore-off-sex-after-heartbreak-no-man-deserves-to-take-me-to-bed-says-OnlyFans-model.png?ex=66833d82&is=6681ec02&hm=1f40b8439a5c9a38c1d7a68ed75806076fbcd78208956741cb8968c9e8c99fdd&=&format=webp&quality=lossless&width=582&height=437"
},
{
"name": "Valerie 🍒",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257117969646092310/NINTCHDBPICT000658831317.png?ex=66833dd8&is=6681ec58&hm=c39be33b78bbac38b938a52a34ea6049107c202bb3410338a23759af72ac92f4&=&format=webp&quality=lossless&width=530&height=662"
},
{
"name": "Tali 😇",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118002902728734/JUGYcByQrI2z3iWH.png?ex=66833de0&is=6681ec60&hm=0023c299bafa1d01ed003c3ee50eb75f03491a2ccb846bceffeba4916728a2b0&=&format=webp&quality=lossless&width=372&height=662"
},
{
"name": "Nimi 💖",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118092488867901/images.png?ex=66833df5&is=6681ec75&hm=ece001624aec3236f7cd3477ee0d955b65c4416e57ad06f6f79fb9f4d3dd6f96&=&format=webp&quality=lossless&width=280&height=281"
},
{
"name": "Mariam 💗",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118093998686359/images.png?ex=66833df5&is=6681ec75&hm=c104096a11498357044569b8b022fd9872b7c9ab5dcaf9d4f446661c083e425c&=&format=webp&quality=lossless&width=367&height=213"
},
{
"name": "Ariana 💞",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118114550644776/images.png?ex=66833dfa&is=6681ec7a&hm=a6addaf621e99cb3a2b5c1b2a35b83cee353ba120334d051fcd1a194f51f972b&=&format=webp&quality=lossless&width=375&height=210"
},
{
"name": "Tele 💖",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118170712375456/kelsey1.png?ex=66833e08&is=6681ec88&hm=354fdc6f6ceeb4e914ffe57abb018f3c2f8f16e0f72effb2b202273e8959517e&=&format=webp&quality=lossless&width=377&height=437"
},
{
"name": "Nandi 🥵",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118189494603937/7c0480979adf69470661fc8200764a64.png?ex=66833e0c&is=6681ec8c&hm=00750d8d28d13629e5fea5c702b14340fbad0595ac025300d996cb633032728e&=&format=webp&quality=lossless&width=687&height=386"
},
{
"name": "Nat 😈",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118228744765522/B9730710753Z.png?ex=66833e15&is=6681ec95&hm=c642e2cf8ac0e55e438cf64379fe810f971565197ca27d174f745de468160583&=&format=webp&quality=lossless&width=676&height=437"
},
{
"name": "Maria 🥰",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118281429549066/image9.png?ex=66833e22&is=6681eca2&hm=440162c0025b76e10c4eb15a01da7e178e9c191cf34cc95c1cfdf502f91b507c&=&format=webp&quality=lossless&width=400&height=437"
},
{
"name": "Gia 🙈",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118370667561021/tailamaddison-onlyfans-stepdad-caught-15.png?ex=66833e37&is=6681ecb7&hm=1b9e7722d7ef69b1a7e02364cb219ec69d132961897417e1a4c8da8d71edfbe5&=&format=webp&quality=lossless&width=500&height=337"
},
{
"name": "Shura ❤️‍🔥",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118405882941552/image.png?ex=66833e40&is=6681ecc0&hm=4ac7b93d4280f5670291dae60ef54eb5bdce6eeab5e2dd31a516a8fec0832c11&=&format=webp&quality=lossless&width=365&height=437"
},
{
"name": "Ivy 💋",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118431560601730/1_PAY-OnlyFans-model-kicked-off-nudist-beach-for-filming-racy-content.png?ex=66833e46&is=6681ecc6&hm=b269d6bc7e4d7334218cdb1924f251cffc7875154841f1ff0a78f380221cc764&=&format=webp&quality=lossless&width=350&height=437"
},
{
"name": "Tete 🫦",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118517640167534/1_OnlyFans-star-Courtney-Clenney-has-been-charged-with-murdering-her-boyfriend-Christian-Obumseli-in-t.png?ex=66833e5a&is=6681ecda&hm=1a4a6d751db64fc0ab677b9db1b78d1474be3533d936384171e442dbdf998de2&=&format=webp&quality=lossless&width=291&height=437"
},
{
"name": "Mitsu 🍑",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118553723637770/2_OnlyFans-model-offered-1m-for-sex-looks-splashing-in-poolside-vid-in-non-existent-thong.png?ex=66833e63&is=6681ece3&hm=57e9515233f6a92d332976f808910d451f33296ca8a7c4fe9594cc494d5b6502&=&format=webp&quality=lossless&width=768&height=511"
},
{
"name": "Xyra 💦",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118570459172974/0_jennalee_275142746_4962983330411438_2543567959700643132_n.png?ex=66833e67&is=6681ece7&hm=92ac0dd22d0e0493a637072de21856626963bb9d98c0a1837e21b48e6332c261&=&format=webp&quality=lossless&width=350&height=437"
},
{
"name": "Jannet 🥛",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257135244822315100/183fa812b6825c0d0a1735c3d06d8ba1.png?ex=66834dee&is=6681fc6e&hm=f610b46b70f73f57e317ebf73fc70581a0432622cb730e6427d48824ed45c08a&=&format=webp&quality=lossless&width=396&height=437"
},
{
"name": "Lia ❤️",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257118633939964084/Z6JLNWEKTFA75PYNRFPCKRT6WU.png?ex=66833e76&is=6681ecf6&hm=ca460656ab3fd9dc63a265eba2b670d7f4c399b6f9bb4525242499e827100bdd&=&format=webp&quality=lossless&width=348&height=437"
},
{
"name": "Camila 💕",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257120842106540192/1_Aussie-Model-Lucy-Banks-Calls-OnlyFans-A-Feminist-Movement.png?ex=66834084&is=6681ef04&hm=cc6deb9a07c4e956dd8e93d44970bc83d57dd355c05f35567cc9a3ee6ddf7a78&=&format=webp&quality=lossless&width=291&height=437"
},
{
"name": "Melu 🍒",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257120890374586410/28283066-8309817-Dark_world_Model_Allison_Parker_has_revealed_there_is_nothing_gl-a-1_1591683965839.png?ex=66834090&is=6681ef10&hm=4cc13507564945cf047918cacc5abc46c21ee676e215f8d3aae10c192e9d5a52&=&format=webp&quality=lossless&width=578&height=437"
},
{
"name": "Francheska 😇",
"image": "https://media.discordapp.net/attachments/1256702993190096908/1257120913405771807/40941c664547df3944799f305014acf1.png?ex=66834095&is=6681ef15&hm=9186a48621bd699c22eff371d53476db6ea64699acd1c844a970342505f08131&=&format=webp&quality=lossless&width=350&height=437"
}
]
5 changes: 5 additions & 0 deletions src/models/servers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { pgTable, varchar } from 'drizzle-orm/pg-core';

export const servers = pgTable('servers', {
server_id: varchar('server_id', { length: 255 }).primaryKey()
});
8 changes: 8 additions & 0 deletions src/models/video.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { pgTable, varchar } from "drizzle-orm/pg-core";
export const videos = pgTable("videos", {
x_url: varchar("x_url", { length: 255 }).primaryKey(),
title: varchar("name", { length: 255 }).notNull(),
url: varchar("url", { length: 255 }).notNull(),
preview: varchar("preview", { length: 255 }).notNull(),
channel_tag: varchar("channel_tag", { length: 100 }).notNull(),
});
10 changes: 10 additions & 0 deletions src/models/webhooks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { pgTable, varchar } from 'drizzle-orm/pg-core';
import { servers } from './servers';

export const webhooks = pgTable('webhooks', {
server_id: varchar('server_id') // Debe coincidir con el nombre en la tabla 'servers'
.notNull()
.references(() => servers.server_id),
webhook_url: varchar('webhook_url', { length: 255 }).notNull(),
channel_tag: varchar('channel_tag', { length: 100 }).notNull()
});
3 changes: 3 additions & 0 deletions src/services/cdnService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const uploadToCdn = async (file: string) => {
console.log(file, "succesfully uploaded to cdn!");
}
10 changes: 10 additions & 0 deletions src/services/discordService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Webhook } from "discord-webhook-node";
import { getGirl } from "../utils/getGirl";

export const sendingWebhook = async (file: string, webhook_url: string) => {
const girl = await getGirl();
const hook = new Webhook(webhook_url);
hook.setAvatar(girl.image);
hook.setUsername(girl.name);
hook.sendFile(file);
};
50 changes: 0 additions & 50 deletions src/services/getVideos.ts

This file was deleted.

Loading

0 comments on commit 99ec7a3

Please sign in to comment.