Advertisement
kohpriwniranam

apiname

Jun 25th, 2023
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. Thestoryshack = ["fake","thai","japanese","indonesian","korean","chinese","human","boy","girl","baby","first","last","anime","dog","cat","dragon","ship","funny","country","city","island","planet","company","kingdom","superhero","team","clan","brand","band","character","elf","star wars","pirate","stripper","nord","dwarf","demon","rap"]
  2. def generateName(to,tipe):
  3. tipenist,kelamin = tipe,random.choice(["male","female"])
  4. theName = ""
  5. a = requests.get(f"https://story-shack-cdn-v2.glitch.me/generators/{tipenist}-name-generator/{kelamin}?count=6").json()["data"]
  6. try:
  7. theName += f"{a[0]['name']}"+"\n"
  8. theName += f"{a[1]['name']}"+"\n"
  9. theName += f"{a[2]['name']}"+"\n"
  10. theName += f"{a[3]['name']}"+"\n"
  11. theName += f"{a[4]['name']}"+"\n"
  12. theName += f"{a[5]['name']}"
  13. except Exception as e:
  14. theName += f"{e}"
  15. self.sendMessage(to, theName)
  16.  
  17. if pesan.lower() == "apilist":
  18. van ="𝐀𝐩𝐢𝐋𝐢𝐬𝐭:\n"
  19. no = 0
  20. for i in Thestoryshack:
  21. no +=1
  22. van += f"{no}. {i}\n"
  23. van += "____________________\n"
  24. van += f"ทั้งหมด {len(Thestoryshack)} รายการ"
  25. self.reply(msg.id,to, van)
  26. if pesan.lower().startswith('reqname '):
  27. sep = str(pesan.split(' ')[1])
  28. peoplesian = sep
  29. generateName(to,peoplesian)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement