zein69

Auto Delete On Bot Start

Oct 2nd, 2023 (edited)
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 0.85 KB | None | 0 0
  1. {
  2.   "name": "Auto Delete On Bot Start",
  3.   "temp": "mem",
  4.   "event-type": "48",
  5.   "_id": "eyxfy",
  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