Marcus
Marcus
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
well its on the docs
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
and how can I use the response?
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
or am I wrong
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
I mean it should put the whole in the console like it does on the website
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
No description
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
btw
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
wait wdym
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
const { Events, ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle, ChannelType, EmbedBuilder,
StringSelectMenuBuilder, StringSelectMenuOptionBuilder, ButtonBuilder, ButtonStyle
} = require('discord.js');
const { createTranscript } = require('discord-html-transcripts')


const delay = ms => new Promise(res => setTimeout(res, ms));

module.exports = {
name: Events.InteractionCreate,
async execute(interaction) {
if(interaction.customId === 'ticketSelect') {
if(interaction.values[0] === 'ticketClose') {

const channel = interaction.channel;

interaction.reply({ content: 'Din ticket vil lukke om 5 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 4 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 3 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 2 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 1 sekundt!' })

await delay(1000)

const file = await createTranscript(interaction.channel, {
limit: 10000000,
returnBuffer: false,
filename: `${channel.name.toLowerCase()}-transscript.html`
});


const button = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setLabel('Åben transscript')
.setURL(`https://mahto.id/chat-exporter?url=${msg.attachments.first()?.url}`)
.setStyle(ButtonStyle.LINK),

new ButtonBuilder()
.setLabel('Download')
.setURL(`${msg.attachments.first()?.url}`)
.setStyle(ButtonStyle.Link)
)

const embed = new EmbedBuilder()
.setColor('#de6910')
.setDescription(`Dit transscript for ${channel}`)

.setFooter({ text: 'I samarbejde med projekt Jet-Nexus', iconURL: 'https://media.discordapp.net/attachments/1135258379737116712/1141078885119823882/marcus-01.png'})

let cache = interaction.client.channels.cache.get(process.env.TRANSSCRIPTS_CHANNEL_ID);
let msg = await cache.send({ files: [file], components: [button], embeds: [embed] })


channel.delete();
}
}
}
}
const { Events, ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle, ChannelType, EmbedBuilder,
StringSelectMenuBuilder, StringSelectMenuOptionBuilder, ButtonBuilder, ButtonStyle
} = require('discord.js');
const { createTranscript } = require('discord-html-transcripts')


const delay = ms => new Promise(res => setTimeout(res, ms));

module.exports = {
name: Events.InteractionCreate,
async execute(interaction) {
if(interaction.customId === 'ticketSelect') {
if(interaction.values[0] === 'ticketClose') {

const channel = interaction.channel;

interaction.reply({ content: 'Din ticket vil lukke om 5 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 4 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 3 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 2 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 1 sekundt!' })

await delay(1000)

const file = await createTranscript(interaction.channel, {
limit: 10000000,
returnBuffer: false,
filename: `${channel.name.toLowerCase()}-transscript.html`
});


const button = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setLabel('Åben transscript')
.setURL(`https://mahto.id/chat-exporter?url=${msg.attachments.first()?.url}`)
.setStyle(ButtonStyle.LINK),

new ButtonBuilder()
.setLabel('Download')
.setURL(`${msg.attachments.first()?.url}`)
.setStyle(ButtonStyle.Link)
)

const embed = new EmbedBuilder()
.setColor('#de6910')
.setDescription(`Dit transscript for ${channel}`)

.setFooter({ text: 'I samarbejde med projekt Jet-Nexus', iconURL: 'https://media.discordapp.net/attachments/1135258379737116712/1141078885119823882/marcus-01.png'})

let cache = interaction.client.channels.cache.get(process.env.TRANSSCRIPTS_CHANNEL_ID);
let msg = await cache.send({ files: [file], components: [button], embeds: [embed] })


channel.delete();
}
}
}
}
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
now it says this
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
No description
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
I think I got it now
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
ohh
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
ehmm no.
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
how can it be an unknown channel?
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
No description
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
const { Events, ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle, ChannelType, EmbedBuilder,
StringSelectMenuBuilder, StringSelectMenuOptionBuilder, ButtonBuilder, ButtonStyle
} = require('discord.js');
const { createTranscript } = require('discord-html-transcripts')


const delay = ms => new Promise(res => setTimeout(res, ms));

module.exports = {
name: Events.InteractionCreate,
async execute(interaction) {
if(interaction.customId === 'ticketSelect') {
if(interaction.values[0] === 'ticketClose') {

const channel = interaction.channel;

interaction.reply({ content: 'Din ticket vil lukke om 5 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 4 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 3 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 2 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 1 sekundt!' })

await delay(1000)
channel.delete();

const file = await createTranscript(interaction.channel, {
limit: 10000000,
returnBuffer: false,
filename: `${channel.name.toLowerCase()}-transscript.html`
});

let cache = interaction.client.channels.cache.get(process.env.TRANSSCRIPTS_CHANNEL_ID);
let msg = await cache.send({ files: [file] })

const button = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setLabel('Åben transscript')
.setURL(`https://mahto.id/chat-exporter?url=${msg.attachments.first()?.url}`)
.setStyle(ButtonStyle.LINK),

new ButtonBuilder()
.setLabel('Download')
.setURL(`${msg.attachments.first()?.url}`)
.setStyle(ButtonStyle.Link)
)

const embed = new EmbedBuilder()
.setColor('#de6910')
.setDescription(`Dit transscript for ${channel}`)

.setFooter({ text: 'I samarbejde med projekt Jet-Nexus', iconURL: 'https://media.discordapp.net/attachments/1135258379737116712/1141078885119823882/marcus-01.png'})


await interaction.editReply({ embeds: [embed], content: ``, components: [button] })
}
}
}
}
const { Events, ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle, ChannelType, EmbedBuilder,
StringSelectMenuBuilder, StringSelectMenuOptionBuilder, ButtonBuilder, ButtonStyle
} = require('discord.js');
const { createTranscript } = require('discord-html-transcripts')


const delay = ms => new Promise(res => setTimeout(res, ms));

module.exports = {
name: Events.InteractionCreate,
async execute(interaction) {
if(interaction.customId === 'ticketSelect') {
if(interaction.values[0] === 'ticketClose') {

const channel = interaction.channel;

interaction.reply({ content: 'Din ticket vil lukke om 5 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 4 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 3 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 2 sekunder!' })

await delay(1000)
await interaction.editReply({ content: 'Din ticket vil lukke om 1 sekundt!' })

await delay(1000)
channel.delete();

const file = await createTranscript(interaction.channel, {
limit: 10000000,
returnBuffer: false,
filename: `${channel.name.toLowerCase()}-transscript.html`
});

let cache = interaction.client.channels.cache.get(process.env.TRANSSCRIPTS_CHANNEL_ID);
let msg = await cache.send({ files: [file] })

const button = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setLabel('Åben transscript')
.setURL(`https://mahto.id/chat-exporter?url=${msg.attachments.first()?.url}`)
.setStyle(ButtonStyle.LINK),

new ButtonBuilder()
.setLabel('Download')
.setURL(`${msg.attachments.first()?.url}`)
.setStyle(ButtonStyle.Link)
)

const embed = new EmbedBuilder()
.setColor('#de6910')
.setDescription(`Dit transscript for ${channel}`)

.setFooter({ text: 'I samarbejde med projekt Jet-Nexus', iconURL: 'https://media.discordapp.net/attachments/1135258379737116712/1141078885119823882/marcus-01.png'})


await interaction.editReply({ embeds: [embed], content: ``, components: [button] })
}
}
}
}
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
how can I make a transcript over my ticket
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
like with a database?
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
do I need to store it?
284 replies
DIAdiscord.js - Imagine an app
Created by Marcus on 8/19/2023 in #djs-questions
SlashCommandHandler - Not answering
how can it know which id the channel is when it creates the channel in another file?
284 replies