RGlobal Discord Bot
Send Messages, Data, and more into your games with one command
using this simple Discord Bot
Invite the bot here
Invite the RGlobal Discord Bot to your server
About RGlobal
RGlobal is a Discord bot that uses Robloxâs MessagingService to send messages, data, announcements and more into Roblox by using one command on Discord!
This bot is completely safe and wonât log any data.
This is my first time ever making a Discord bot.
By using RGlobal Discord bot you agree that you have read and agree to our Privacy Policy below:
Tutorial
In this tutorial I will be showing you how to make a Global Announcement system using the RGlobal bot, our goal is to run one command and have all servers in our game notified with an announcement. Although, keep in mind you can use this tutorial to make so much more with this bot. We will cover this soon
Iâve made a video showing you how to go through the process of making this, but we will cover it in more depth in this tutorial. You can watch it here
RGlobal - Roblox Studio Tutorial
This was my first video with my voice, so I sound very nervous lol
Step One - UI
Our first step in making our Global Announcement system is to create our announcement UI to display our Global Messages
All my UI has is a Frame, Image Label and Text Label. All we really need is the text label and the Frame.
Step Two - Client
Lets make a local script inside our Frame. This will held us display our message. In order for our message to be activated however, we need a Remote Event. So Iâve made a RemoteEvent in ReplicatedStorage called SetGlobalMessage.
Now all we need to do is listen for our event to be fired, then display the message. Keep in mind the msg
argument will be a string holding our message.
local messageBox = script.Parent.Parent.Globalmessage
game.ReplicatedStorage.Admin.SetGlobalMessage.OnClientEvent:Connect(function(msg)
messageBox.Visible = true
messageBox.Text.Text = msg
wait(10)
messageBox.Visible = false
end)
Now if we fire this event and pass in a string with our message, it will be displayed.
Step 3 - Server
Now, if we want to fire our event, we need to fire it on the server. So lets create a Script in ServerScriptService. In this script we will be using MessagingService and subscribing to a topic.
local MessagingService = game:GetService("MessagingService")
MessagingService:SubscribeAsync("Announcement", function(message)
game.ReplicatedStorage.Admin.SetGlobalMessage:FireAllClients(message.Data)
end)
The first argument of our SubscribeAsync function is our Topic, this is very important, think of it as the name of our event. So every time we run our command from our bot, we will use the topic to help send the message.
Step 4 - API
Next we need to get our API Key, this is crucial when sending data between Discord and Roblox. Luckily, Roblox allows us to do this very easily using API Extensions
Create your API Extension here
Give your API and name and a description.
Open the Select API System Drop down and select Messaging Service API then type your experienceâs name in the search bar. If you are going to use this bot in a public discord channel PLEASE only use this API for MessagingService
Next, allow access to the IP 0.0.0.0/0, we are using this IP because the bot is hosted by Discloud, the IP that Discloud has access to is 0.0.0.0/0.
Generate and COPY Your Key. Keep this key safe AND DONâT SHARE IT!
Sharing your API key can allow others to use your API extension.
Step 5 - Discord
The hard part is finally over, now we can run the command to activate our announcement. Invite the RGlobal Discord Bot to your server, once youâve done that get the Universe ID for your experience. Make sure you also have your API Key and Subscription Topic we mentioned earlier with you.
Now we need to run the /sendmsg command in our server
By filling in the needed data, we can now send the message, and all servers will see the announcement âThis is a Test Message!â in game, live!
Conclusion
Not only can you use this bot for global announcments but you can also use it for so much more! Such as a command to kick a player, Lower a playerâs health, give playerâs items etc. In order to do this, change the code within the SubscribeAsync function as this function will run when your command is sent. Make sure to change your topic to something different for each command.
If you have any questions donât be afraid to ask down below as Iâd be happy to help!
Code Review
Thank you for reading