Salagata

Udongein Edit Bot in NotSoBot

Nov 8th, 2025 (edited)
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. {js:
  2. {ignore:
  3. const fs = require('fs');
  4. const { exec } = require('child_process');
  5. const fetch = require('node-fetch');
  6. const { url } = require('url');
  7. }
  8. async function download(link) {
  9. const response = await fetch(url);
  10.  
  11. if (!response.ok) {
  12. throw new Error(`Error al descargar: ${response.statusText}`);
  13. }
  14.  
  15. const filename = path.basename();
  16.  
  17. const stream = fs.createWriteStream(filename);
  18. response.body.pipe(stream);
  19.  
  20. stream.on('finish', () => {
  21. console.log(`Video descargado como ${filename}`);
  22. });
  23.  
  24. stream.on('error', (err) => {
  25. console.error('Error al guardar el archivo:', err);
  26. });
  27. }
  28.  
  29. (async function() {
  30. const command = discord.variables.__args[0] ?? "help";
  31. switch(command) {
  32. case "help":
  33. console.log({jsonify:This bot has many features.
  34. # Commands:
  35. ## File Handler:
  36. `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.
  37. `ueb delete <filenames...>`: Deletes a file, or files
  38. `ueb deleteall`: Deletes ALL your files saved
  39. `ueb clone <filename1> <filename2>`: Clones a file into another file
  40. `ueb rename <old_filename> <new_filename>`: Renames a file
  41. `ueb show <filename>`: Shows a file
  42. `ueb list`: Lists all your files
  43. ueb search <query>: Search a file by a query
  44.  
  45.  
  46. ## Process Video:
  47. `ueb convert <new_format>`: Converts a file to any format
  48. `ueb ffprobe`: Shows ulil information about the file
  49. `ueb ffmpeg <code>`: Process a video with FFMPEG
  50. `ueb magick <code>`: Process a video with ImageMagick
  51. `ueb ihtxffmpeg <powers> <duration> <code...>`: Does an FFMPEG ihtx with Powers and Duration
  52.  
  53. ## Presets:
  54. `ueb addpreset <name> <type> <code...>`: Creates a Preset
  55. `ueb deletepreset <name>`: Deletes a preset
  56. `ueb infopreset <name>`: Shows info about the preset
  57. `ueb presets`: Shows the list of presets
  58. `ueb preset <name> <args...>`: Runs a preset
  59.  
  60. ## Miscaleanous:
  61. `ueb help`: Shows the help list
  62. `ueb support`: Links to support the bot
  63. `ueb export`: Exports all your configs(files,presets)
  64. `ueb import`: Imports a config to the bot
  65. })
  66. break;
  67. }
  68. })()
  69. }
Advertisement
Add Comment
Please, Sign In to add comment