Compare commits
2 commits
eecb6020ea
...
424d5ab02a
Author | SHA1 | Date | |
---|---|---|---|
424d5ab02a | |||
2714c748bf |
3 changed files with 11 additions and 13 deletions
|
@ -36,7 +36,8 @@ export default {
|
||||||
await interaction.editReply({ content: '❌ Uh oh! The video is too big!', ephemeral: true });
|
await interaction.editReply({ content: '❌ Uh oh! The video is too big!', ephemeral: true });
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fs.renameSync(output, `./asset/ytp/userVid/${file}`);
|
// CopyFile instead of rename in case you have /tmp and the asset folder on different a disk.
|
||||||
|
fs.copyFileSync(output, `./asset/ytp/userVid/${file}`);
|
||||||
const mp4 = [];
|
const mp4 = [];
|
||||||
fs.readdirSync('./asset/ytp/userVid/').forEach(f => {
|
fs.readdirSync('./asset/ytp/userVid/').forEach(f => {
|
||||||
if (f.endsWith('mp4')) {
|
if (f.endsWith('mp4')) {
|
||||||
|
|
11
index.js
11
index.js
|
@ -17,12 +17,11 @@ const client = new Client({
|
||||||
|
|
||||||
// Load commands
|
// Load commands
|
||||||
client.commands = new Collection();
|
client.commands = new Collection();
|
||||||
await loadCommandFromDir('fun');
|
|
||||||
await loadCommandFromDir('secret');
|
const categoryPath = fs.readdirSync(`${__dirname}/commands`);
|
||||||
await loadCommandFromDir('utility');
|
categoryPath.forEach(category => {
|
||||||
await loadCommandFromDir('voice');
|
loadCommandFromDir(category);
|
||||||
await loadCommandFromDir('admin');
|
});
|
||||||
await loadCommandFromDir('owner');
|
|
||||||
|
|
||||||
// Load events
|
// Load events
|
||||||
await loadEventFromDir('client', client);
|
await loadEventFromDir('client', client);
|
||||||
|
|
|
@ -11,12 +11,10 @@ const __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = path.dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
const commands = [];
|
const commands = [];
|
||||||
await loadCommandFromDir('fun');
|
const categoryPath = fs.readdirSync(`${__dirname}/../commands`);
|
||||||
await loadCommandFromDir('secret');
|
categoryPath.forEach(category => {
|
||||||
await loadCommandFromDir('utility');
|
loadCommandFromDir(category);
|
||||||
await loadCommandFromDir('voice');
|
});
|
||||||
await loadCommandFromDir('admin');
|
|
||||||
await loadCommandFromDir('owner');
|
|
||||||
commands.map(command => command.toJSON());
|
commands.map(command => command.toJSON());
|
||||||
|
|
||||||
const rest = new REST({ version: '9' }).setToken(token);
|
const rest = new REST({ version: '9' }).setToken(token);
|
||||||
|
|
Loading…
Reference in a new issue