Forhand.
Forhand.
DIAdiscord.js - Imagine an app
Created by Forhand. on 12/10/2023 in #djs-questions
SyntaxError: Missing } in template expression
No description
2 replies
DIAdiscord.js - Imagine an app
Created by Forhand. on 11/1/2023 in #djs-questions
Move Log
No description
30 replies
DIAdiscord.js - Imagine an app
Created by Forhand. on 10/10/2023 in #djs-questions
Canvas fillText
I want if the line exceeds the canvas width it'll minimuze the text until the specfic size then it'll go to second line
4 replies
DIAdiscord.js - Imagine an app
Created by Forhand. on 10/10/2023 in #djs-questions
message collector from array
No description
109 replies
DIAdiscord.js - Imagine an app
Created by Forhand. on 10/8/2023 in #djs-questions
canvas text box
No description
3 replies
DIAdiscord.js - Imagine an app
Created by Forhand. on 10/2/2023 in #djs-questions
How to search through auditlog targets
how to search through auditlogs targets, I'm using this code:
const fetchedLogs = await <guild>.fetchAuditLogs({
limit: 1,
type: AuditLogEvent.MemberRoleUpdate,
}).catch(err => { console.log(err) });
const RoleLog = fetchedLogs.entries.first();
tt = RoleLog.changes.filter(t => t.key == `$add`) && RoleLog.target.filter(u => u.id == `userid`);
console.log(tt);
const fetchedLogs = await <guild>.fetchAuditLogs({
limit: 1,
type: AuditLogEvent.MemberRoleUpdate,
}).catch(err => { console.log(err) });
const RoleLog = fetchedLogs.entries.first();
tt = RoleLog.changes.filter(t => t.key == `$add`) && RoleLog.target.filter(u => u.id == `userid`);
console.log(tt);
but RoleLog.target.filter is not a function
2 replies
DIAdiscord.js - Imagine an app
Created by Forhand. on 10/1/2023 in #djs-questions
catch message.delete()
how to catch() the message.delete() method, I'm using:
message.delete().catch(err => { console.log(err) })
message.delete().catch(err => { console.log(err) })
but still not works, the bot is still crashes
3 replies
DIAdiscord.js - Imagine an app
Created by Forhand. on 9/30/2023 in #djs-questions
Unknown Channel
No description
17 replies
DIAdiscord.js - Imagine an app
Created by Forhand. on 9/28/2023 in #djs-questions
get role through data
No description
5 replies
DIAdiscord.js - Imagine an app
Created by Forhand. on 9/26/2023 in #djs-questions
get channel permission for user
is it possible to check if user has a certain permission in channel for example
let ow = message.channel.permissionoverwrites.get(userID);
if (ow) {
if (ow.Speak === false) {
do the command
}
}
let ow = message.channel.permissionoverwrites.get(userID);
if (ow) {
if (ow.Speak === false) {
do the command
}
}
10 replies
DIAdiscord.js - Imagine an app
Created by Forhand. on 9/17/2023 in #djs-questions
setInterval not accurate
Hello, I'm using setInterval for every 10 seconds to store 10000 in json file and adding another 10000 so total 20000 and so on. I notice that setInterval isn't accurate like when it's 120 seconds which is 2 minutes it's 240000 in JSON file so is there another way to calculate the time in every 10 seconds?
3 replies
DIAdiscord.js - Imagine an app
Created by Forhand. on 9/17/2023 in #djs-questions
How To check the time active
How do I check the time active that members in the voice, I used the voiceStateUpdate Event and it will calculates by setInterval every 60000 ms will add time: 60000 to the user in JSON file, so how to let it stops the setInterval when the user leaves the voice channel. And continues again when joins the channels.
5 replies
DIAdiscord.js - Imagine an app
Created by Forhand. on 9/12/2023 in #djs-questions
How to delete all autoModerationRules rules in specific guild?
How to delete all autoModerationRules rules in specific guild?
10 replies