/[sudobot]/trunk/src/commands/utils/AddsnippetCommand.ts
ViewVC logotype

Diff of /trunk/src/commands/utils/AddsnippetCommand.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 359 by rakin, Mon Jul 29 17:29:40 2024 UTC revision 360 by rakin, Mon Jul 29 17:29:46 2024 UTC
# Line 70  export default class AddsnippetCommand e Line 70  export default class AddsnippetCommand e
70              try {              try {
71                  let filename = Math.round(Math.random() * 1000000) + '_' + file.name!;                  let filename = Math.round(Math.random() * 1000000) + '_' + file.name!;
72                  filenames.push(filename);                  filenames.push(filename);
73                  await download(file.url, path.resolve(__dirname, '../../..', 'storage', filename));                  await download(file.url, path.resolve(process.env.SUDO_PREFIX ?? path.join(__dirname, '../../..'), 'storage', filename));
74              }              }
75              catch (e) {              catch (e) {
76                  console.log(e);                                  console.log(e);                

Legend:
Removed from v.359  
changed lines
  Added in v.360

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26