force generation option
This commit is contained in:
parent
a73fd2b893
commit
9765680f1c
1 changed files with 8 additions and 4 deletions
|
@ -9,10 +9,14 @@ const prefixs = prefix.split(',');
|
|||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('ytp')
|
||||
.setDescription('Generate a YTP'),
|
||||
.setDescription('Generate a YTP')
|
||||
.addBooleanOption(option =>
|
||||
option.setName('force')
|
||||
.setDescription('Force the generation of the video in non-nsfw channel.')
|
||||
.setRequired(false)),
|
||||
category: 'fun',
|
||||
async execute(interaction, arg) {
|
||||
if (!interaction.channel.nsfw && !arg[0]) return interaction.reply(`Please execute this command in an NSFW channel ( Content might not be NSFW but since the video are user submitted better safe than sorry ) OR do \`\`${prefixs[0]}ytp --force\`\` to make the command work outside of nsfw channel BE AWARE THAT IT WON'T CHANGE THE FINAL RESULT SO NSFW CAN STILL HAPPEN`);
|
||||
async execute(interaction, args) {
|
||||
if (!interaction.channel.nsfw && !args[0]) return interaction.reply(`Please execute this command in an NSFW channel ( Content might not be NSFW but since the video are user submitted better safe than sorry ) OR do \`\`${prefixs[0]}ytp --force\`\` to make the command work outside of nsfw channel BE AWARE THAT IT WON'T CHANGE THE FINAL RESULT SO NSFW CAN STILL HAPPEN`);
|
||||
|
||||
// Read userVid folder and select random vid and only take .mp4
|
||||
const mp4 = [];
|
||||
|
@ -46,7 +50,7 @@ export default {
|
|||
resources: './asset/ytp/resources/',
|
||||
temp: os.tmpdir(),
|
||||
sourceList: asset,
|
||||
intro: arg[0] ? './asset/ytp/intro.mp4' : null,
|
||||
intro: args[0] ? './asset/ytp/intro.mp4' : null,
|
||||
outro: './asset/ytp/outro.mp4',
|
||||
OUTPUT_FILE: `${os.tmpdir()}/${interaction.id}_YTP.mp4`,
|
||||
MAX_CLIPS: MAX_CLIPS,
|
||||
|
|
Loading…
Reference in a new issue