I need help
When the bot is supposed to rename the channel, it does not.
The erorr
renameOrderChannel: Provided channel does not support setName! Type: undefined, ID: undefined Value received: test
The orders/utils.js: https://sourceb.in/wx6EPfMBbV
The index.js: https://sourceb.in/bzRq7pIz7d
31 Replies
why not use
<GuildChannel>#editwait I am looking at the wrong line
Could you give the full error
renameOrderChannel: Provided channel does not support setName! Type: undefined, ID: undefined Value received: test
with the stack trace
That is what the entire terminal says
Logged in as Palette Utilities#7730!
(node:19284) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead.
(Use
node --trace-warnings ... to show where the warning was created)
renameOrderChannel: Provided channel does not support setName! Type: undefined, ID: undefined Value received: testthis is not a discord.js error this is a
console#warn that you added on line 75 of orders/utils.js
Oh, so do I remove that?
So it looks like it's working as intended
But, Mafia is also right,
.setName() is not a function on ChannelNow it works, but I have a different problem.
ok, what is it?
This is my new index.js: https://sourceb.in/RrdaHK9116 I edited it a bit.
After the order is claimed, the unclaim button does not work now, all it says is "THe bot is thinking...."
Without looking, that means you defer a reply but never actually reply later
Now I'll look at the code
Alright.
@Samtino is there any guide that shows me how to do that? I cant seem to find how to do it
assuming this is the code is in the if on line 172. this is an issue with your code as one of the awaited function is not returning. I think the one on 189 is the cause
here is the guide on Deferred responses
Do you have an error? Or at least can you tell us where to look? This file does like 20 things
I got something different
Yes, so um I edited my orders/utils.js that now says the erorr: https://sourceb.in/sFYVjC24A8
THe erorr:
node:events:498
throw er; // Unhandled 'error' event
^
DiscordAPIError[50001]: Missing Access
at handleErrors (D:\alex dumb bot2\node_modules@discordjs\rest\dist\index.js:748:13)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async SequentialHandler.runRequest (D:\alex dumb bot2\node_modules@discordjs\rest\dist\index.js:1149:23)
at async SequentialHandler.queueRequest (D:\alex dumb bot2\node_modules@discordjs\rest\dist\index.js:980:14)
at async _REST.request (D:\alex dumb bot2\node_modules@discordjs\rest\dist\index.js:1293:22)
at async GuildChannelManager.edit (D:\alex dumb bot2\node_modules\discord.js\src\managers\GuildChannelManager.js:315:21)
at async renameOrderChannel (D:\alex dumb bot2\orders\utils.js:79:12)
at async Client.<anonymous> (D:\alex dumb bot2\index.js:148:9)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:403:10)
at process.processTicksAndRejections (node:internal/process/task_queues:92:21) {
requestBody: {
files: undefined,
json: {
name: 'test-clothing-36-claimed',
type: undefined,
topic: undefined,
nsfw: undefined,
bitrate: undefined,
user_limit: undefined,
rtc_region: undefined,
video_quality_mode: undefined,
parent_id: undefined,
lock_permissions: undefined,
rate_limit_per_user: undefined,
default_auto_archive_duration: undefined,
permission_overwrites: undefined,
available_tags: undefined,
default_reaction_emoji: undefined,
default_thread_rate_limit_per_user: undefined,
flags: undefined,
default_sort_order: undefined,
default_forum_layout: undefined
}
},
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'PATCH',
url: 'https://discord.com/api/v10/channels/1382731900073807984'
}
Node.js v22.8.0
you app is missing the permission to edit the channel
Ahhh
I fixed that, still not working
no error
If you aren't getting any errors, try to place
console.log checkpoints throughout your code to find out where execution stops.
- Once you do, log relevant values and if-conditions
- More sophisticated debugging methods are breakpoints and runtime inspections: learn moreThanks everyone. It is just a 10 minute delay now, but thats fine. But now, after the channel is unclaimed, the new claim button does not work. It says interaction failed.
index.js: https://sourceb.in/CjdHpQb7Kj
orders/utils.js: https://sourceb.in/KbT6MkIWpc
An interaction fail message in Discord client means that you never reply to the interaction
Still not working... https://sourceb.in/6KbPGLkqnB
ok, I am not programing for you, I will help if you have a spific issue
That is now what I am asking for you to do
The customID for your button is likely being ignored. Assuming you're not getting any errors in the console
ye i dont get any console erorrs
I have tried to read docs, ask friends but nothing is working
Give me a minute
^
Add some more logging. Places I would start are, beginning of your "interactionCreate" handler, at the beginning of your logic for the specific button, and the end of the logic for the button
Because since you're not getting an error, none of your "if" statements are triggering on the customID, so nothing is actually happening on your bot