Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ OWNER_NUMBER= "255767×××××"
WARN_COUNT= ""
STARTING_BOT_MESSAGE='on'
SESSION_ID=''
IMGUR_CLIENT_ID=''
TENOR_API_KEY=''
DATABASE_URL="postgresql://postgres:bKlIqoOUWFIHOAhKxRWQtGfKfhGKgmRX@viaduct.proxy.rlwy.net:47738/railway"
8 changes: 4 additions & 4 deletions scs/conversion.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { downloadMediaMessage,downloadContentFromMessage } = require('@whiskeyso
const fs =require("fs-extra") ;
const axios = require('axios');
const FormData = require('form-data');
const { exec } = require("child_process");
const { execFile } = require("child_process");



Expand Down Expand Up @@ -189,7 +189,7 @@ bmbtz({ nomCom: "write", categorie: "Conversion", reaction: "☘️" }, async (o
data.append('image', fs.createReadStream(image));

//Configure headers
const clientId = 'b40a1820d63cd4e'; // Replace with your Imgur client ID
const clientId = process.env.IMGUR_CLIENT_ID;
const headers = {
'Authorization': `Client-ID ${clientId}`,
...data.getHeaders()
Expand Down Expand Up @@ -255,7 +255,7 @@ bmbtz({nomCom:"photo",categorie: "Conversion", reaction: "☘️"},async(dest,zk
let ran = await alea(".png");


exec(`ffmpeg -i ${mediaMess} ${ran}`, (err) => {
execFile('ffmpeg', ['-i', mediaMess, ran], (err) => {
fs.unlinkSync(mediaMess);
if (err) {
zk.sendMessage(
Expand Down Expand Up @@ -292,7 +292,7 @@ async (dest, zk, commandeOptions) => {
}

const gifSearchTerm = arg.join(" ");
const tenorApiKey = "AIzaSyCyouca1_KKy4W_MG1xsPzuku5oa8W358c"; // Remplacez par votre clé d'API Tenor
const tenorApiKey = process.env.TENOR_API_KEY;

try { for ( i = 0 ; i < 5 ; i++) {
const gif = await axios.get(
Expand Down