summaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
authorolive <olive@olive.ooo>2026-09-27 01:29:02 +0100
committerolive <olive@olive.ooo>2026-09-27 01:29:02 +0100
commit59d210c7139358f769441db8c5c0d92db17065f1 (patch)
treec9abd266f4285c641943c9f4436c3171fd3a0ad4 /discord
parente18625310d9e71a1297634e46ea60bde8a782d44 (diff)
Pylon Message IDsolive
Not stored. Not IRC.
Diffstat (limited to 'discord')
-rw-r--r--discord/pylon.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/discord/pylon.lua b/discord/pylon.lua
index c2afc3a..bc55826 100644
--- a/discord/pylon.lua
+++ b/discord/pylon.lua
@@ -130,6 +130,7 @@ function Discord.handle_dispatch(self, event)
channel = Thing(self, d.channel_id, 'TODO discord channel names'),
author = Thing(self, d.author.id, d.author.username),
body = d.content,
+ pylon_ids = { [self]=d.id },
})
end
end
@@ -139,10 +140,11 @@ function Discord.sending(self)
for dest_channel, message in self.inbox:iter() do
self.log:proto('>',dest_channel,message.author,message.body)
local wh = self.channels[dest_channel.id].wh
- self:_req('webhooks/'..wh.id..'/'..wh.token, {
+ local res = self:_req('webhooks/'..wh.id..'/'..wh.token, {
username = message.author:name_with_shortname(),
content = message.body,
})
+ message.pylon_ids[self] = message.id
end
end