To use the CreateRole function, you need to require it the Osiris API
const { osiris } = require("../../api/osiris.js") // or the path to it
Code Example
const roleName = "hi";
const Server = data?.ServerId;
const Channel = data.ChannelId;
osiris.createRole(XSessionToken, Server, RoleName, Channel).catch((err) => { // we're including channel so the sendmessage func works.. not actually needed
return console.log(err); // we need to catch too
})