Discord to roblox Setrank command

Is there any code for a setrank command? I’m looking for a command where you can do !setrank user rank. This will rank a player in the group to the rank they specified. If anyone has any code for this and would share it, reply.

1 Like

Your question is too general. The rank that you want to change is a Discord server rank or a Roblox group rank?

A roblox rank. Using noblox.js.

You can use discord web hooks and interact with them using HTTPServices.
https://devforum.roblox.com/t/discord-integration-a-guide-on-using-discord-through-roblox-updated/47090

It’s supposed to be a discord bot. I want a command which you can say then it promotes the user to the rank the user specified. Example: !setrank fxlantic Co-Owner

You can use the web hook to interact with the bot, for example; you can check if the bot has sent a message with the ROBLOX Webhook API, if the message is “!setrank” you can by then get the player and set their role in the group by the group ID.

Well, I have this open sourced code. Is there any way to convert it to !setrank player rank? Atm it’s, !setrank player ROLE ID

https://pastebin.com/raw/kPEuq3Zk

As I’ve told you, you can send messages to roblox with the discord webhook, and then check from roblox if the message is the ‘!setrank player rank’, after that you can check if the rank and the player is valid, and then you can change the player’s rank in the group. Here are the resources…


https://devforum.roblox.com/t/discord-integration-a-guide-on-using-discord-through-roblox-updated/47090

That’s just a harder way and I don’t think that would work.

Well, I’m not sure of any other ways you can do it.
This is the only way I’m aware of where you can interact with roblox and discord.
And the only way you can change the player’s rank in a group from a roblox script.
It’s very complicated, so I’d prefer to just change the player’s rank manually.

Here’s a tutorial that uses the noblox.js library and explains how to create a ‘promote’ command. You can view the library for noblox.js and modify it to be setRank instead of promote.

How do I add the specify rank part? That code is !promote user. I’m looking for a command where you specify the rank name.

If you are not familiar with Node.js I recommend creating a post in #public-collaboration:public-recruitment to hire somebody to code this for you. Right now you are basically asking some to do this for you. This category is only for support for issues you are having about something you are attempting yourself.

Alright, I’ll post on there. Thanks.

Perhaps instead of .promote you’re looking for changeRank? Not on my pc right now so I cannot supply much, but i found this when looking through noblox, feel free to give it a look. https://github.com/suufi/noblox.js/releases