Advertisement
IamnotJamesBG

Simple TTS Command (V2.6)

Apr 20th, 2025 (edited)
608
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 1.77 KB | None | 0 0
  1. $c[VERSION 2.6 (Final Update)]
  2. $c[CHANGELOGS]
  3. $c[
  4. - Fixed tons of bugs during audio generation
  5. - Overall improved audio generation
  6. - New API link]
  7. $c[Comment from the maker (me)]
  8. $c[So this is the last api link change, and the final update for this, unless there's a big change, so for now, this will function, and will always be free to use, any improvements or modifications are welcome, so enjoy using this! :D]
  9.  
  10. $c[This is my first very own made API, kinda buggy, but it works!]
  11. $c[VARS NEEDED
  12. TOKEN=YOUR TOKEN HERE]
  13. $c[If the API is down, just dm me on discord]
  14. $c[Username: iamnotjamesbg]
  15. $c[This doesn't need an API key, I gave it to you for free!]
  16. $c[API is still new, expect more endpoints soon™]
  17.  
  18. $c[=====CODE======]
  19. $nomention
  20. $botTyping
  21. $suppressErrors[🚫 Something went wrong consider the following:
  22. - API is down or lagging
  23. - API failed to process the response
  24. - Server-side fault
  25. -# Contact the API dev if this kept happening]
  26. $argsCheck[>1;🚫 Please say atleast something]
  27. $cooldown[5s;⏰ Whoops! You must wait for atleast **%time%** to generate another one again!]
  28. $onlyIf[$charCount[$message]<=2000;🚫 You've reached the maximum 2000 character limit]
  29. $onlyIf[$httpStatus!=200;⚠️ Something went wrong, or you got ratelimited!]
  30. $var[ttsgen;$sendMessage[Generating TTS...;yes]]
  31. $httpGet[https://jmlite-tts-api-production.up.railway.app/api/tts?message=$url[encode;$message]&channel=$channelID&bot_token=$getVar[TOKEN]&lang=en-uk]
  32.  
  33. $editMessage[$channelID;$var[ttsgen];Generated!
  34. $httpResult[0;fileUrl]]
  35. $c[=====END OF CODE======]
  36.  
  37. $c[=====ENDING MESSAGE======]
  38. $c[You can give credit when reposting or modifying something]
  39. $c[Ask for permission first before reposting]
  40. $c[⚠️DO NOT ABUSE THE API CUZ IT AFFECTS ALL THE USERS USING IT⚠️]
Tags: BDFD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement