summaryrefslogtreecommitdiff
path: root/discord/pylon.lua
diff options
context:
space:
mode:
authorrebecca <ubq323@ubq323.website>2026-09-24 16:50:51 +0100
committerrebecca <ubq323@ubq323.website>2026-09-24 18:20:50 +0100
commitdff5363f96029aba6d0f222d3e31ab3888d7111f (patch)
treedfa1877b3fce2725952aaf91b818a8c673f1af83 /discord/pylon.lua
parent3f54007ab621d2e6b652523259b1cb2d3d158e22 (diff)
rename descriptor -> id because augh
Diffstat (limited to 'discord/pylon.lua')
-rw-r--r--discord/pylon.lua14
1 files changed, 7 insertions, 7 deletions
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,