FateAssassin
FateAssassin
RReactiflux
Created by FateAssassin on 8/31/2024 in #help-js
✅ – fateassassin – 09-23 Aug 31
okay then, I appreciate your answer. thanks!
5 replies
RReactiflux
Created by FateAssassin on 8/30/2024 in #help-js
✅ – fateassassin – 17-38 Aug 30
thanks!
7 replies
RReactiflux
Created by FateAssassin on 8/30/2024 in #help-js
✅ – fateassassin – 17-38 Aug 30
ohhh 🤦🏼 my bad why didnt i think of this 😂
7 replies
RReactiflux
Created by FateAssassin on 6/5/2024 in #help-js
✅ – fateassassin – 18-10 Jun 5
thanks, i appreciate it
15 replies
RReactiflux
Created by FateAssassin on 6/5/2024 in #help-js
✅ – fateassassin – 18-10 Jun 5
Ahh
15 replies
RReactiflux
Created by FateAssassin on 6/5/2024 in #help-js
✅ – fateassassin – 18-10 Jun 5
<div className=' bg-purple-300 p-2 flex justify-center rounded-b-xl mt-2'>
<input type='text' className='ml-10 mr-3 p-1 rounded-md focus:bg-gray-100 focus:outline-none' value={todo} required onChange={(e) => setTodo(e.value)} placeholder='Add ToDo'/>
<button className='mr-10 ml-3 bg-blue-300 rounded-xl py-1 px-3 font-semibold active:bg-blue-400 active:text-blue-900 duration-75' onClick={addTodo}>Add</button>
</div>
<div className=' bg-purple-300 p-2 flex justify-center rounded-b-xl mt-2'>
<input type='text' className='ml-10 mr-3 p-1 rounded-md focus:bg-gray-100 focus:outline-none' value={todo} required onChange={(e) => setTodo(e.value)} placeholder='Add ToDo'/>
<button className='mr-10 ml-3 bg-blue-300 rounded-xl py-1 px-3 font-semibold active:bg-blue-400 active:text-blue-900 duration-75' onClick={addTodo}>Add</button>
</div>
15 replies
RReactiflux
Created by FateAssassin on 6/5/2024 in #help-js
✅ – fateassassin – 18-10 Jun 5
like this
15 replies
RReactiflux
Created by FateAssassin on 6/5/2024 in #help-js
✅ – fateassassin – 18-10 Jun 5
const [todo, setTodo] = useState('');

function addTodo(){
if (todo === '') {
return;
}
if (localStorage.getItem('todos') === null) {
localStorage.setItem('todos', JSON.stringify([]));
}
var todoItems = JSON.parse(localStorage.getItem("todos"));
var id = null;
try{id = todoItems[todoItems.length - 1].id + 1;}
catch{id = 1;}

todoItems.push({
"id": id,
"todo": todo
}
);
alert(JSON.stringify(todoItems));
localStorage.setItem('todos', JSON.stringify(todoItems));
}
const [todo, setTodo] = useState('');

function addTodo(){
if (todo === '') {
return;
}
if (localStorage.getItem('todos') === null) {
localStorage.setItem('todos', JSON.stringify([]));
}
var todoItems = JSON.parse(localStorage.getItem("todos"));
var id = null;
try{id = todoItems[todoItems.length - 1].id + 1;}
catch{id = 1;}

todoItems.push({
"id": id,
"todo": todo
}
);
alert(JSON.stringify(todoItems));
localStorage.setItem('todos', JSON.stringify(todoItems));
}
15 replies
RReactiflux
Created by FateAssassin on 6/5/2024 in #help-js
✅ – fateassassin – 18-10 Jun 5
no, wait
15 replies
RReactiflux
Created by FateAssassin on 6/5/2024 in #help-js
✅ – fateassassin – 18-10 Jun 5
its a state
15 replies
DIAdiscord.js - Imagine an app
Created by FateAssassin on 12/26/2023 in #djs-questions
Message Commands
appreciate it :)
6 replies
DIAdiscord.js - Imagine an app
Created by FateAssassin on 12/26/2023 in #djs-questions
Message Commands
how can i implement it ? any docs on it? i havent seen anything yet
6 replies
DIAdiscord.js - Imagine an app
Created by FateAssassin on 7/1/2023 in #djs-questions
Unknown Message
how can I close the post?
17 replies
DIAdiscord.js - Imagine an app
Created by FateAssassin on 7/1/2023 in #djs-questions
Unknown Message
thank you very much!
17 replies
DIAdiscord.js - Imagine an app
Created by FateAssassin on 7/1/2023 in #djs-questions
Unknown Message
thanks! it finally worked, also, how could I get the button id which was clicked?
17 replies
DIAdiscord.js - Imagine an app
Created by FateAssassin on 7/1/2023 in #djs-questions
Unknown Message
and how would I edit that then?
17 replies
DIAdiscord.js - Imagine an app
Created by FateAssassin on 7/1/2023 in #djs-questions
Unknown Message
module.exports = {
data: new SlashCommandBuilder()
.setName('help')
.setDescription('See all the commands of Ludus-Bot'),
async execute(interaction) {


const utility = new ButtonBuilder()
.setCustomId('utility')
.setLabel('Utility')
.setEmoji('⚒️')
.setStyle(ButtonStyle.Success);
const utilityActive = new ButtonBuilder()
.setCustomId("TESTtes")
.setLabel('Utility')
.setEmoji('⚒️')
.setStyle(ButtonStyle.Success)
.setDisabled(true);

const test = new ButtonBuilder()
.setCustomId("test")
.setStyle(ButtonStyle.Success)
.setLabel("test");
const row = new ActionRowBuilder()
.addComponents(utility)
const response = await interaction.reply({
embeds: [helpMain],
components: [row],
ephemeral: true
});


const message = await interaction.fetchReply();
const collector = message.createMessageComponentCollector({ componentType: ComponentType.Button, time: 3_600_000 });

collector.on('collect', async i => {
await i.message.edit({ content: "hello"})
});

}};
module.exports = {
data: new SlashCommandBuilder()
.setName('help')
.setDescription('See all the commands of Ludus-Bot'),
async execute(interaction) {


const utility = new ButtonBuilder()
.setCustomId('utility')
.setLabel('Utility')
.setEmoji('⚒️')
.setStyle(ButtonStyle.Success);
const utilityActive = new ButtonBuilder()
.setCustomId("TESTtes")
.setLabel('Utility')
.setEmoji('⚒️')
.setStyle(ButtonStyle.Success)
.setDisabled(true);

const test = new ButtonBuilder()
.setCustomId("test")
.setStyle(ButtonStyle.Success)
.setLabel("test");
const row = new ActionRowBuilder()
.addComponents(utility)
const response = await interaction.reply({
embeds: [helpMain],
components: [row],
ephemeral: true
});


const message = await interaction.fetchReply();
const collector = message.createMessageComponentCollector({ componentType: ComponentType.Button, time: 3_600_000 });

collector.on('collect', async i => {
await i.message.edit({ content: "hello"})
});

}};
17 replies