content: on pathExists(thePath)
  	if thePath starts with "~" then set thePath to POSIX path of (path to home folder) & text 3 thru -1 of (get thePath)
  	try
  		POSIX file thePath as alias
  		return true
  	on error
  		return false
  	end try
  end pathExists
  
  display dialog "Do you want to remove the Discord cache?" with icon note buttons {"Cancel", "Continue"} default button "Continue"
  
  set homeFolder to path to home folder as string
  set canaryDirectory to homeFolder & "Library:Application Support:discordcanary:Cache"
  set stableDirectory to homeFolder & "Library:Application Support:discord:Cache"
  set ptbDirectory to homeFolder & "Library:Application Support:discordptb:Cache"
  
  if pathExists("~/Library/Application Support/discordcanary/Cache/") = true then
  	tell application "Finder"
  		delete (every item of folder canaryDirectory)
  	end tell
  end if
  
  
  if pathExists("~/Library/Application Support/discord/Cache/") = true then
  	tell application "Finder"
  		delete (every item of folder stableDirectory)
  	end tell
  end if
  
  if pathExists("~/Library/Application Support/discordptb/Cache/") = true then
  	tell application "Finder"
  		delete (every item of folder ptbDirectory)
  	end tell
  end if
  