Discord Announcement-To-Roblox Chat?

I was wondering if there is a way to make it so when an announcement is made in a Discord channel it would appear in the Roblox chat in some way? :face_with_monocle:

Help is appreciated!

I’ve been experimenting with API, Webhooks, and other stuff so I have some knowledge…

1 Like

You can’t use webhooks for this.

You’ll need to make your own bot that is capable of posting messages and check constantly in your game to see if any posts were made. You should probably also use MessagingService to prevent API exhaust.

3 Likes

Webhooks will be no use for this. Instead, you could send requests to your own server, which has a bot that listens to messages in a certain discord channel. The server can then respond with a message ID and the message content

Pseudocode:

local latestId = 0
while true do
local resp = http:GetAsync("...") -- the url
local content = http:JSONDecode(resp)
if content.id ~= latestId then -- it can be the message id or a guid
latestId = content.id -- updates the latest id
sendMessage(content.message) -- sends the message to the game
end
wait(2) -- to avoid spamming requests
end
2 Likes