Torrino
Torrino
DIAdiscord.js - Imagine an app
Created by Torrino on 4/27/2024 in #djs-questions
What are the exact differences between a Webhook and a Webhook client?
This is the answer I was lookin for. Thank you kindly ❤️
4 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 4/21/2024 in #djs-questions
All the mentioned users in my GuildMemberAdd logs are suddenly 'unknown-user'
Thanks, appreciate it
5 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 4/21/2024 in #djs-questions
All the mentioned users in my GuildMemberAdd logs are suddenly 'unknown-user'
No description
5 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
Is that due to the same reasons?
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
I've also had scenarios where the audit log clearly shows a role being removed from the guild member yet the role is still on them
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
I've definitely had those scenarios in the audit logs before
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
No set method is being used for example
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
So if in my code in place A guildRole a is being added while in place B the guildRole b is being removed with add and remove methods respectively, at the same time, it can cause an issue?
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
Okay so now we're getting somewhere
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
There are other places in my code that change roles, yes, but there definitely isn't a place in my code that changes THESE specific roles
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
Every once in a while, my guild member is missing one random role that is present in that array
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
But that's all besides the point. Let's say I have this
const roles: string[] = ['399186047256363008', '399186312856469506', '399186497456308225', '399186503940571147', '399186515542016011', '399186520717787147'];

guildMember.roles.set(permRoles);
const roles: string[] = ['399186047256363008', '399186312856469506', '399186497456308225', '399186503940571147', '399186515542016011', '399186520717787147'];

guildMember.roles.set(permRoles);
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
Thanks for the tips on js. I have the guarantee I mentioned because createdCharacter.sicc.strength, intelligence, charisma and cunning are all set before to a range from 0-5
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
And I had scenarios where they would get 3 instead of 4
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
Basically, I have a guarantee that a guildMember should have 1 role from each array
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
I know that this is far from an okay way of writing this but it will illustrate my example
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
var strRoles = ['399186047256363008', '399186312856469506', '399186497456308225', '399186503940571147', '399186515542016011', '399186520717787147'];
var intRoles = ['399216062450892811', '399216066145812481', '399216068951801889', '399216071086964736', '399216073171271694', '399216076086575105'];
var charRoles = ['3399216095367528450', '399216101038489610', '399216102963412992', '399216103965851650', '399216105668739083', '399216107040538625'];
var cunRoles = ['399186525214081025', '399187023388344331', '399187027184189452', '399187032087461888', '399187036424110080', '399187040341852171'];

for(let i = 0; i < strRoles.length; i++) {
if(createdCharacter.sicc.strength == i) {
const str = strRoles[i];
permRoles.push(str)
break;
}
}
for(let i = 0; i < intRoles.length; i++) {
if(createdCharacter.sicc.intelligence == i) {
const int = intRoles[i];
permRoles.push(int)
break;
}
}
for(let i = 0; i < charRoles.length; i++) {
if(createdCharacter.sicc.charisma == i) {
const char = charRoles[i];
permRoles.push(char)
break;
}
}
for(let i = 0; i < cunRoles.length; i++) {
if(createdCharacter.sicc.cunning == i) {
const cun = cunRoles[i];
permRoles.push(cun)
break;
}
}

// some other irrelevant code

guildMember.roles.set(permRoles);
var strRoles = ['399186047256363008', '399186312856469506', '399186497456308225', '399186503940571147', '399186515542016011', '399186520717787147'];
var intRoles = ['399216062450892811', '399216066145812481', '399216068951801889', '399216071086964736', '399216073171271694', '399216076086575105'];
var charRoles = ['3399216095367528450', '399216101038489610', '399216102963412992', '399216103965851650', '399216105668739083', '399216107040538625'];
var cunRoles = ['399186525214081025', '399187023388344331', '399187027184189452', '399187032087461888', '399187036424110080', '399187040341852171'];

for(let i = 0; i < strRoles.length; i++) {
if(createdCharacter.sicc.strength == i) {
const str = strRoles[i];
permRoles.push(str)
break;
}
}
for(let i = 0; i < intRoles.length; i++) {
if(createdCharacter.sicc.intelligence == i) {
const int = intRoles[i];
permRoles.push(int)
break;
}
}
for(let i = 0; i < charRoles.length; i++) {
if(createdCharacter.sicc.charisma == i) {
const char = charRoles[i];
permRoles.push(char)
break;
}
}
for(let i = 0; i < cunRoles.length; i++) {
if(createdCharacter.sicc.cunning == i) {
const cun = cunRoles[i];
permRoles.push(cun)
break;
}
}

// some other irrelevant code

guildMember.roles.set(permRoles);
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
Sorry I was digging up some older code that I knew for a fact didnt work 100% of the time
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
Yes
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
I have 2 roles, one I want to add and one I want removed and I get random cases where one of those operations just doesn't happen
34 replies