EndergamerMC
EndergamerMC
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 7/12/2023 in #djs-questions
Forum thread tag not working
Why doesn't my bot add the tag to the forum thread?
const serverId = interaction.guild.id;

const forumChannel = config[serverId].channels.forum_channel;
console.log(forumChannel);

const channel = interaction.client.channels.cache.get(forumChannel);
const tag = config[serverId].tags.forum_rollenanfrage_tag;
channel.threads.create({
name: `Rollenanfrage für ${interaction.fields.getTextInputValue('username')}, Angefragt von ${interaction.member}`,
message: {
embeds: [anfrageEmbed],
components: [ModeratorButtons],
},
appliedTags: [tag],
});
const serverId = interaction.guild.id;

const forumChannel = config[serverId].channels.forum_channel;
console.log(forumChannel);

const channel = interaction.client.channels.cache.get(forumChannel);
const tag = config[serverId].tags.forum_rollenanfrage_tag;
channel.threads.create({
name: `Rollenanfrage für ${interaction.fields.getTextInputValue('username')}, Angefragt von ${interaction.member}`,
message: {
embeds: [anfrageEmbed],
components: [ModeratorButtons],
},
appliedTags: [tag],
});
29 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
Hey, I have a problem with my pagination. I'll attach a video so you can understand the problem. Here's my code: https://sourceb.in/k6HUMLoMJ2
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/24/2023 in #djs-questions
How to update an embed after button click with new values?
My Code: https://sourceb.in/q1iy2h2Nfx I want to update my embed with the new page values etc. whenever the 'gelöst' or 'ungelöst' button is clicked so that I dont get Invalid Form Errors when sending the new embed. How could I do this? I know that my code is very messy at the point, I just wanted to get it to work before i make it clean. Thank you!
59 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/10/2023 in #djs-questions
Pagination
Hello, I'm currently experiencing an issue with pagination in my Discord.js bot, specifically related to updating the content of pages. Here's a brief overview of the problem: I have implemented a pagination system that allows users to navigate through a list of items using previous and next buttons. Each page displays a limited number of items (let's say 5). The initial setup works fine, with the first page displaying the correct items. The second page displays the same objects as the first one and the third page shows the items 6-10 eventough i have 11 items so there's one item missing, which is showed when clicking on the previous page button to go back to page 2. However, when I delete an item on the last page, and the page becomes empty, the buttons for previous and next still appear, and the content of the page doesn't update accordingly. As a result, the pagination becomes inconsistent and doesn't reflect the actual state of the data. I have reviewed my code and made attempts to fix the issue, but so far, I haven't been successful. I suspect there might be a problem with updating the currentPage and totalPages variables correctly when the page becomes empty. I'm using discord.js v14.11.0 and node v18.15.0. I'll attach a video of the problem and my code down below. I would greatly appreciate any guidance or suggestions on how to resolve this issue. If there's any additional information or code that would be helpful, please let me know. Thank you in advance for your assistance!
12 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 5/29/2023 in #djs-questions
Pagination with Mongoose DB
I have a command where a user can add like reminders to the database. I have a command that shows the list of reminders but now i want the user to be able to go through a list of his reminders with two buttons. On every page there should only be 5 reminders because i have a feature that allows the user to mark the reminders with successful or not successful via buttons (see picture). How can I do that?
37 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 3/19/2023 in #djs-questions
Autocomplete shows everything when nothing is typed
How can I do it so that when the user doesn't type anything, the autocomplete shows nothing
4 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 3/18/2023 in #djs-questions
Autocomplete case sensitive
How can I do it so that my autocomplete command is not case sensitive?
9 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 3/15/2023 in #djs-questions
Basic commands/features?
Hi, I’m currently developing a bot, but I ran out of ideas. What are some basic commands/buttons/features my bot should have? It’s not supposed to be a moderation bot.
3 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 3/8/2023 in #djs-questions
Give User Roles with SelectMenu
25 replies