Categories > Exploiting > Roblox >

Is it possible to modify or delete a message on discord with a webhook? using the request function

New Reply

Posts: 1

Threads: 1

Joined: Mar, 2025

Reputation: 0

Posted

local Feedbackw = Tabs.Feedback:AddDropdown("Feedbackw", {
    Title = "Rate this script",
    Description = "Please rate this seriously for future improvements",
    Values = {"⭐", "⭐⭐", "⭐⭐⭐", "⭐⭐⭐⭐", "⭐⭐⭐⭐⭐"},
    Multi = false,
    Default = nil,
})

 

local Feedbackz = Tabs.Feedback:AddInput("Feedbackz", {
    Title = "Reason for rating",
    Default = "",
    Placeholder = "Give us your feedback",
    Numeric = false, 
    Finished = true,
    Callback = function(Value)
 
    end
})

 

local currentRating = nil
local currentFeedbackText = ""
local messageId = nil
local webhookUrl = "this is where id put my webhook" 

 

local function SendFeedbackToWebhook()
    if not currentRating then return end 

 

    local player = game.Players.LocalPlayer
    local username = player.Name
    local username2 = player.DisplayName
    local placeId = game.PlaceId
    local placeName = game:GetService("MarketplaceService"):GetProductInfo(placeId).Name

 

    local embed = {
        ["title"] = "Feedback: " .. placeName,
        ["description"] = "Feedback from " .. username2,
        ["color"] = 3447003,
        ["fields"] = {
            { ["name"] = "Username", ["value"] = username, ["inline"] = true },
            { ["name"] = "Rating", ["value"] = currentRating, ["inline"] = true },
            { ["name"] = "Comments", ["value"] = currentFeedbackText ~= "" and currentFeedbackText or "No comments provided", ["inline"] = false }
        }
    }

 

    local data = { ["embeds"] = { embed } }
    local body = game:GetService("HttpService"):JSONEncode(data)
   
    local headers = { ["Content-Type"] = "application/json" }

 

 
    local url = messageId and (webhookUrl .. "/messages/" .. messageId) or webhookUrl
    local method = messageId and "PATCH" or "POST"

 

 
    if messageId then
        local deleteUrl = webhookUrl .. "/messages/" .. messageId
        local deleteSuccess, deleteResponse = pcall(function()
            return request({
                Url = deleteUrl,
                Method = "DELETE",
                Headers = headers
            })
        end)

 

        if deleteSuccess and deleteResponse then
            print("Old message deleted successfully!")
        else
            warn("Failed to delete old message!")
        end
    end

 

 
    local success, response = pcall(function()
        return request({
            Url = url,
            Method = method,
            Headers = headers,
            Body = body
        })
    end)

 

    if success and response and response.Success then
        if not messageId then
            local success2, responseData = pcall(function()
                return game:GetService("HttpService"):JSONDecode(response.Body)
            end)
            if success2 and responseData and responseData.id then
                messageId = responseData.id
            end
        end
        print("Feedback sent successfully!")
    else
        warn("Failed to send feedback!")
    end
end

 

 
Feedbackw:OnChanged(function(Value)
    currentRating = Value
    SendFeedbackToWebhook()
end)

 

 
Feedbackz:OnChanged(function(Value)
    currentFeedbackText = Value
    if currentRating then
        task.delay(1, SendFeedbackToWebhook)
    end
end)
  • 0

  • Comment

Posts: 725

Threads: 71

Joined: Oct, 2022

Reputation: 29

Replied

Deleting a message with a webhook is not possible as webhooks just sends certain messages to discord. Deleting peoples messages is only really possible with discord bots.

  • 0

  • Comment

Languages - C++, C#,Javascript, HTML, CSS, Lua ,Xaml, Python

https://dsc.gg/hackerpluto

_realnickk

Security Researcher

moderator

Posts: 37

Threads: 3

Joined: Feb, 2020

Reputation: 88

Replied

You can delete the webhook itself by sending a DELETE request to the webhook link, but if you want to take it a notch further and delete messages, you'll need a Discord bot and a HTTP frontend to interact with it using HTTP. If you do this, you'll need to keep security in mind.

 

Edit: You can theoretically use websockets to connect to Discord's gateway on the exploit end but I wouldn't recommend it for security and stability purposes. You don't want to store a Discord bot token in a client script.

  • 0

  • Comment

Massive computer geek. I focus on cybersecurity now but I pop on randomly to drop lore. https://github.com/reversed-coffee

Login to unlock the reply editor

Add your reply

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )