Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {js:
- {ignore:
- const fs = require('fs');
- const { exec } = require('child_process');
- const fetch = require('node-fetch');
- const { url } = require('url');
- }
- async function download(link) {
- const response = await fetch(url);
- if (!response.ok) {
- throw new Error(`Error al descargar: ${response.statusText}`);
- }
- const filename = path.basename();
- const stream = fs.createWriteStream(filename);
- response.body.pipe(stream);
- stream.on('finish', () => {
- console.log(`Video descargado como ${filename}`);
- });
- stream.on('error', (err) => {
- console.error('Error al guardar el archivo:', err);
- });
- }
- (async function() {
- const command = discord.variables.__args[0] ?? "help";
- switch(command) {
- case "help":
- console.log({jsonify:This bot has many features.
- # Commands:
- ## File Handler:
- `ueb load <filename> <attachment_link?>`: Loads a file, to access it later, you must set the filename, if link isn't provided, it will download the attachment, if no attachment is provided, reply attachment will be used.
- `ueb delete <filenames...>`: Deletes a file, or files
- `ueb deleteall`: Deletes ALL your files saved
- `ueb clone <filename1> <filename2>`: Clones a file into another file
- `ueb rename <old_filename> <new_filename>`: Renames a file
- `ueb show <filename>`: Shows a file
- `ueb list`: Lists all your files
- ueb search <query>: Search a file by a query
- ## Process Video:
- `ueb convert <new_format>`: Converts a file to any format
- `ueb ffprobe`: Shows ulil information about the file
- `ueb ffmpeg <code>`: Process a video with FFMPEG
- `ueb magick <code>`: Process a video with ImageMagick
- `ueb ihtxffmpeg <powers> <duration> <code...>`: Does an FFMPEG ihtx with Powers and Duration
- ## Presets:
- `ueb addpreset <name> <type> <code...>`: Creates a Preset
- `ueb deletepreset <name>`: Deletes a preset
- `ueb infopreset <name>`: Shows info about the preset
- `ueb presets`: Shows the list of presets
- `ueb preset <name> <args...>`: Runs a preset
- ## Miscaleanous:
- `ueb help`: Shows the help list
- `ueb support`: Links to support the bot
- `ueb export`: Exports all your configs(files,presets)
- `ueb import`: Imports a config to the bot
- })
- break;
- }
- })()
- }
Advertisement
Add Comment
Please, Sign In to add comment