How to get the active file ID in google apps script
<p>So im currently using this to get the active file id of an add-on. However this only works on documents and not spreadsheets or forms. Anyone know a way around this?</p>

<pre><code> var files = DriveApp.getFileById(DocumentApp.getActiveDocument().getId());
</code></pre>