Advertisement
samiroexpikachu

Note

Feb 8th, 2024 (edited)
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. module.exports = {
  2. config: {
  3. name: 'note',
  4. version: '1.0',
  5. author: 'Samir Œ',
  6. countDown: 0,
  7. role: 0,
  8. shortDescription: 'Create a note',
  9. longDescription: 'Generate a note with the provided text.',
  10. category: 'utility',
  11. guide: {
  12. en: '{pn} [text]',
  13. },
  14. },
  15. onStart: async function ({ message, args }) {
  16. const noteText = args.join(' ');
  17.  
  18. if (!noteText) {
  19. message.reply('Please provide text for the note.');
  20. return;
  21. }
  22.  
  23. const noteUrl = `https://apis-samir.onrender.com/note?text=${encodeURIComponent(noteText)}`;
  24. const noteAttachment = await global.utils.getStreamFromURL(noteUrl);
  25.  
  26. message.reply({
  27. body: 'Here is your note:',
  28. attachment: noteAttachment,
  29. });
  30. },
  31. };
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement