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

Is there a specific script to use to link a web hook from discord to a script?

Asked by
Ixdia -2
6 years ago

I have HTTP enabled I don't know what script I need to use to link a webhook from a discord server to a script.

1 answer

Log in to vote
0
Answered by
Rare_tendo 3000 Moderation Voter Community Moderator
6 years ago

You'll need to get the webhook I'd and use the script I've provided.

local http = game:GetService('HttpService')
local Id = your webhook Id here

local data = {
         ['username'] = 'This will be the name that will be shown';
         ['content'] = 'The message that will be shown';
}

data = http:JSONEncode(data)
http:PostAsync(id, data)

If this helped, please answer this question.

0
by id, I mean url Rare_tendo 3000 — 6y
Ad

Answer this question