zein69

Auto Delete Move

Oct 2nd, 2023
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. {
  2. "name": "Auto Delete",
  3. "temp": "mem",
  4. "event-type": "Member Move Voice Channel",
  5. "_id": "IOLyk",
  6. "actions": [
  7. {
  8. "behavior": "1",
  9. "interpretation": "0",
  10. "code": "const serverId = '1032763617919119361'\nconst category = \"1021954822628450354\";\nconst chidSave = ['1158024413808169020', '1153871997810520074']\nconsole.log('ok');\n(async () => {\n\tconst guild = await client.guilds.fetch(serverId);\n\tawait guild.channels.cache.filter(async (ch) => {\n\t\tif (ch.type === \"GUILD_VOICE\" && ch.parentId === category && ch.members.size == 0 && !chidSave.includes(ch.id)) {\n\t\t\ttry {\n\t\t\t\tawait ch.delete('Voice Channel Empty')\n\t\t\t} catch (error) {\n\t\t\t\t//error\n\t\t\t}\n\t\t} else {\n\t\t\treturn\n\t\t}\n\t});\n})();",
  11. "storage": "0",
  12. "varName": "",
  13. "name": "Run Script"
  14. }
  15. ],
  16. "temp2": "ch"
  17. }
Advertisement
Add Comment
Please, Sign In to add comment