Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local HttpService = game:GetService("HttpService");
- function SendMessage(Webhook, Message, Botname)
- if not string.find(Webhook, "https://discordapp.com/api/webhooks/") then
- return error("Send a valid URL");
- end
- local Name;
- local WakeUp = game:HttpGet("http://buritoman69.glitch.me");
- local API = "http://buritoman69.glitch.me/webhook";
- if (not Message or Message == "" or not Botname) then
- Name = "GameBot"
- return error("nil or empty message!")
- else
- Name = Botname;
- end
- local Body = {
- ['Key'] = tostring("applesaregood"),
- ['Message'] = tostring(Message),
- ['Name'] = Name,
- ['Webhook'] = Webhook
- }
- Body = HttpService:JSONEncode(Body);
- local Data = game:HttpPost(API, Body, false, "application/json")
- return Data or nil;
- end
- SendMessage("WebHookHere", "MessageHere", "BotNameHere")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement