Skip to content

Commit

Permalink
bugfix: parse Json object into camel case for IsUnique call
Browse files Browse the repository at this point in the history
  • Loading branch information
4x8Matrix committed May 24, 2024
1 parent 583a6d6 commit 35f81ba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Package/Classes/Objects/DiscordApplication.luau
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ local ApplicationCommandBuilder = require("../Builders/ApplicationCommandBuilder
local DiscordEndpoints = require("../../Data/DiscordEndpoints")
local CacheType = require("../../Enums/CacheType")

local EventIn = require("../Network/Middleware/EventIn")

--[=[
@class Objects.DiscordApplication
Expand Down Expand Up @@ -162,7 +164,7 @@ function DiscordApplication.Prototype.setSlashCommandsAsync(self: DiscordApplica
end

local existingCommandJsonClone = table.clone(existingCommandJson)
local existingCommandClone = command:toJSONObject()
local existingCommandClone = self.eventIn:processJSON(command:toJSONObject())

-- fixme: contexts seem to be reported incorrectly?
existingCommandClone.contexts = { }
Expand Down Expand Up @@ -197,6 +199,8 @@ function DiscordApplication.Interface.new(discordClient: any, applicationData: {
id = applicationData.id,
flags = applicationData.flags,

eventIn = EventIn.new(),

discordClient = discordClient
}, DiscordApplication.Prototype)
end)
Expand All @@ -206,6 +210,8 @@ export type DiscordApplication = typeof(DiscordApplication.Prototype) & {
id: string,
flags: number,

eventIn: EventIn.EventIn,

discordClient: any,
}

Expand Down

0 comments on commit 35f81ba

Please sign in to comment.