Advertisement
hammercoolness

Untitled

Sep 12th, 2024
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. local HttpService = game:GetService("HttpService")
  2. local url = "http://fi3.bot-hosting.net:20143/send" -- 파이썬 서버 주소
  3.  
  4. local function sendToDiscord(message)
  5. local data = {
  6. ["content"] = message
  7. }
  8. local jsonData = HttpService:JSONEncode(data)
  9.  
  10. local success, response = pcall(function()
  11. return HttpService:PostAsync(url, jsonData, Enum.HttpContentType.ApplicationJson)
  12. end)
  13.  
  14. if success then
  15. print("Message sent to Discord")
  16. else
  17. warn("Failed to send message")
  18. end
  19. end
  20.  
  21. sendToDiscord("로블록스에서 보내는 메시지!")
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement