summaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
Diffstat (limited to 'discord')
-rw-r--r--discord/pylon.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/discord/pylon.lua b/discord/pylon.lua
index 70c6a40..f035fbc 100644
--- a/discord/pylon.lua
+++ b/discord/pylon.lua
@@ -132,8 +132,9 @@ function Discord.handle_dispatch(self, event)
and d.author.id ~= self.channel_to_webhook[d.channel_id].id
and d.author.id ~= self.bot_id
then
- self.wilson:deliver({
- channel = Thing(self, d.channel_id, 'channel name here'),
+ self.wilson:deliver(Message {
+ pylon = self,
+ channel = Thing(self, d.channel_id, 'TODO discord channel names'),
author = Thing(self, d.author.id, d.author.username),
body = d.content,
})
@@ -143,10 +144,10 @@ end
function Discord.sending(self)
for dest_channel, message in self.inbox:iter() do
- self.log:proto('>',dest_channel,message.sender,message.body)
+ self.log:proto('>',dest_channel,message.author,message.body)
local wh = self.channel_to_webhook[dest_channel.id]
self:_req('webhooks/'..wh.id..'/'..wh.token, {
- username = message.sender.." ["..message.source_channel.pylon.shortname.."]",
+ username = message.author:name_with_shortname(),
content = message.body,
})
end