I noticed something in many discord servers recently, the person who is a member of the developer forum is given a special role. I want to tell you exactly, for example, when the person writes
! Toogle devforum, if the developer is a member of the forum, I want him to give him a role,
do you think this can be done in javascript? How to do it?
You should be able to use some parts of this post. Instead of using HTTP Service, you could use e.g Axios to deal with your HTTP Requests. If you’re going to use Axios, you just gotta make a get request through it. E.g;
const axios = require("axios");
var flag = false
var trust_level = 0;
await axios.get(`https://devforum.roblox.com/u/aIoNeDarK01`)
.then(function (response) {
if (response.data.errors){
flag = true;
}else{
// --user is valid, get trust_level
trust_level = response.data.trust_level
}
}).catch(function (error) {
//-- error
console.log(`Error - ${error} (toggleforum.js)`)
message.channel.send(`**ERROR**\n\`${error}\``)
})
Note this ain’t tested so ya might run into some issues.
There are a lot of discord servers dedicated to programming (including JS). I’ll link one here