From dff5363f96029aba6d0f222d3e31ab3888d7111f Mon Sep 17 00:00:00 2001 From: rebecca Date: Thu, 24 Sep 2026 16:50:51 +0100 Subject: rename descriptor -> id because augh --- discord/pylon.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'discord/pylon.lua') diff --git a/discord/pylon.lua b/discord/pylon.lua index b996ee7..70c6a40 100644 --- a/discord/pylon.lua +++ b/discord/pylon.lua @@ -79,18 +79,18 @@ function Discord._connect(self) end function Discord.add_channel(self, channel) - local webhooks = self:_req("channels/"..channel.descriptor.."/webhooks") + local webhooks = self:_req("channels/"..channel.id.."/webhooks") for _,wh in pairs(webhooks) do if wh.application_id == self.bot_id then - self.log("Found existing webhook for channel",channel.descriptor) - self.channel_to_webhook[channel.descriptor] = wh + self.log("Found existing webhook for channel",channel.id) + self.channel_to_webhook[channel.id] = wh return end end - self.log("Making webhook for channel",channel.descriptor) - local wh = self:_req("channels/"..channel.descriptor.."/webhooks", { + self.log("Making webhook for channel",channel.id) + local wh = self:_req("channels/"..channel.id.."/webhooks", { name=self.name:gsub("discord",""):gsub("clyde","").." wilson hook" }) - self.channel_to_webhook[channel.descriptor] = wh + self.channel_to_webhook[channel.id] = wh end function Discord._heartbeating(self, interval_ms) @@ -144,7 +144,7 @@ end function Discord.sending(self) for dest_channel, message in self.inbox:iter() do self.log:proto('>',dest_channel,message.sender,message.body) - local wh = self.channel_to_webhook[dest_channel.descriptor] + local wh = self.channel_to_webhook[dest_channel.id] self:_req('webhooks/'..wh.id..'/'..wh.token, { username = message.sender.." ["..message.source_channel.pylon.shortname.."]", content = message.body, -- cgit v1.2.3