Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

I was wondering, How do I connect roblox to discord?

Asked by 5 years ago

It's a hard question, I know, but i was wondering because http requests don't seem to work for http://discordapp.com/api.

I've tried using this code:

hr = game:getService('HttpRequest')

hr:GetAsync("discordapp.com/guilds/<insert id here>", true)

and got nothing.

0
To clarify: it was a 401: Unauthorized Error TheGalaxyRBLX 222 — 5y
0
Are you trying to use webhooks? Astralyst 389 — 5y
0
https://forum.scriptinghelpers.org/topic/183/discord-webhook-module sadly Discord now blocks roblox requests User#5423 17 — 5y
0
Using discord is not the best idea. Maybe try using data stores instead. But if you really have to, replace discordapp.com with discord.osy.ris. brokenVectors 525 — 5y
0
did you turn on http in game settings? Araknala 14 — 5y

1 answer

Log in to vote
3
Answered by
Avigant 2374 Moderation Voter Community Moderator
5 years ago

Please first consider whether or not you actually need to use Discord for what you're doing. Discord is an instant messaging service, not:

  • An error logging tool.
  • A feedback monitoring tool.
  • A database.

There's a better tool for the job if you need something specific.

In any case, firstly it's worth noting that ServiceProvider:getService() is probably deprecated, so you should switch to game:GetService(). Furthermore, the service name is HttpService, not HttpRequest.

The issue at hand is that due to massive abuse of the Discord API from Roblox developers who think that every problem is a nail and Discord and Trello are hammers, Discord blocks requests coming from Roblox directly.

You're still allowed to use the Discord API from your Roblox game, but you need to route your API requests through some sort of proxy. It's important to make sure that you follow the Discord rules for using their API, and again, consider that there may be a better tool for the job.

Ad

Answer this question