1 |
import { CommandInteraction, GuildMember, Interaction, Message, MessageAttachment } from 'discord.js'; |
import { CommandInteraction, Message, MessageAttachment } from 'discord.js'; |
2 |
import BaseCommand from '../../utils/structures/BaseCommand'; |
import BaseCommand from '../../utils/structures/BaseCommand'; |
3 |
import DiscordClient from '../../client/Client'; |
import DiscordClient from '../../client/Client'; |
4 |
import CommandOptions from '../../types/CommandOptions'; |
import CommandOptions from '../../types/CommandOptions'; |
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); |