Shahar
Shahar
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/30/2024 in #djs-questions
memory
Average?
7 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/30/2024 in #djs-questions
memory
What is the normal usage of memory for a simple bot (like per shard)
7 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/30/2024 in #djs-questions
memory
is there anything I can do to reduce it?
7 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/30/2024 in #djs-questions
memory
No description
7 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
sweepers: {
...Options.DefaultSweeperSettings,
messages: {
interval: 3600,
lifetime: 3600,
},
users: {
interval: 46400,
filter: () => user => user.id !== client.user.id
},
}
sweepers: {
...Options.DefaultSweeperSettings,
messages: {
interval: 3600,
lifetime: 3600,
},
users: {
interval: 46400,
filter: () => user => user.id !== client.user.id
},
}
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
I am messing with sweepers maybe that’s why
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
@Qjuh that was the solution, using permissionOverwrite, thank you very much for your help. @duck btw I do need to fetch the channel in order for the cache to be updated, I got accross some issues if I dont fetch it which its not updated, so I do fetch everytime altough its slower
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
That is way I need to check only the bot permission overwrite in the channel I guess
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
Exactly right
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
Like to relate to my bot permissions in a specific channel where the interaction came from as I mentioned
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
I want to relate only to the channels and it doesn’t
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
But it’s not checking it properly
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
The bot is adding to its self the permissions overwrites at a certain point. And if a user will remove it , it will cause issues to my bot. So I want to check at any time if he has it, if not just return a message
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
Yes
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
he is tryin to edit a message but he has no permissions
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
still didn't work, when everyone is on "null" and there is no permissions for the bot in the channel he doesnt have the neseccery perms. code:
const botPermissions = interaction.appPermissions
console.log(botPermissions);
if(!botPermissions.has(channelPermissions)){
channelPermissionErrorEmbedMessage(interaction);
return;
}
const botPermissions = interaction.appPermissions
console.log(botPermissions);
if(!botPermissions.has(channelPermissions)){
channelPermissionErrorEmbedMessage(interaction);
return;
}
output:
PermissionsBitField {bitfield: 140742606547984n}

DiscordAPIError[50001]: Missing Access
at handleErrors (C:\Users\Shahar Gutman\Desktop\node_modules\@discordjs\rest\dist\index.js:727:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (C:\Users\Shahar Gutman\Desktop\node_modules\@discordjs\rest\dist\index.js:1128:23)
at async SequentialHandler.queueRequest (C:\Users\Shahar Gutman\Desktop\node_modules\@discordjs\rest\dist\index.js:959:14)
at async _REST.request (C:\Users\Shahar Gutman\Desktop\node_modules\@discordjs\rest\dist\index.js:1272:22)
at async GuildMessageManager.edit (C:\Users\Shahar Gutman\Desktop\node_modules\discord.js\src\managers\MessageManager.js:188:15)
at async updateChannelPrimalMessage (C:\Users\Shahar Gutman\Desktop\events\ChannelUpdate.js:142:3)
at async checkNewState (C:\Users\Shahar Gutman\Desktop\events\ChannelUpdate.js:94:5)
at async Object.execute (C:\Users\Shahar Gutman\Desktopevents\ChannelUpdate.js:36:2) {requestBody: {…}, rawError: {…}, code: 50001, status: 403, method: 'PATCH', …}
PermissionsBitField {bitfield: 140742606547984n}

DiscordAPIError[50001]: Missing Access
at handleErrors (C:\Users\Shahar Gutman\Desktop\node_modules\@discordjs\rest\dist\index.js:727:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (C:\Users\Shahar Gutman\Desktop\node_modules\@discordjs\rest\dist\index.js:1128:23)
at async SequentialHandler.queueRequest (C:\Users\Shahar Gutman\Desktop\node_modules\@discordjs\rest\dist\index.js:959:14)
at async _REST.request (C:\Users\Shahar Gutman\Desktop\node_modules\@discordjs\rest\dist\index.js:1272:22)
at async GuildMessageManager.edit (C:\Users\Shahar Gutman\Desktop\node_modules\discord.js\src\managers\MessageManager.js:188:15)
at async updateChannelPrimalMessage (C:\Users\Shahar Gutman\Desktop\events\ChannelUpdate.js:142:3)
at async checkNewState (C:\Users\Shahar Gutman\Desktop\events\ChannelUpdate.js:94:5)
at async Object.execute (C:\Users\Shahar Gutman\Desktopevents\ChannelUpdate.js:36:2) {requestBody: {…}, rawError: {…}, code: 50001, status: 403, method: 'PATCH', …}
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
oh nice, thank you very much
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
true, thats exactly what I need but for a button interaction
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
I hope I've explained it well, its kinda complicated messing with the permissions
30 replies
DIAdiscord.js - Imagine a bot
Created by Shahar on 9/28/2024 in #djs-questions
Permissions
Like he continue becuase he "has" the permissions, but infact the bot is throwing error missing permissions. when he does have the role in the channel its not throwing any error
30 replies