diff options
| author | rebecca <ubq323@ubq323.website> | 2026-09-24 17:20:42 +0100 |
|---|---|---|
| committer | rebecca <ubq323@ubq323.website> | 2026-09-24 18:55:05 +0100 |
| commit | 71cee0014368f5d83fe94989526a4ffb2824f50c (patch) | |
| tree | cd87a5c7d859d98f48866ff769ef89d60a28d5d5 /quaddle/pylon.lua | |
| parent | dff5363f96029aba6d0f222d3e31ab3888d7111f (diff) | |
change fields on Message to include author
Diffstat (limited to 'quaddle/pylon.lua')
| -rw-r--r-- | quaddle/pylon.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/quaddle/pylon.lua b/quaddle/pylon.lua index 2d283ea..4387342 100644 --- a/quaddle/pylon.lua +++ b/quaddle/pylon.lua @@ -80,22 +80,22 @@ function Quaddle.recving(self) end function Quaddle.handle_message(self, msg) - self.log:proto('<',msg.channel_id,msg.author.username,msg.content) + self.log:proto('<',msg.channel_id,msg.author.name,msg.content) if msg.author.id ~= self.bot_user.id then - self.wilson:deliver({ - source_channel = Thing(self, msg.channel), + self.wilson:deliver(Message { + pylon = self, + channel = Thing(self, msg.channel), + author = Thing(self,msg.author.id,msg.author.username), body = msg.content, - sender = msg.author.name, }) end end function Quaddle.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) self:_req('channels/'..dest_channel.id..'/messages', { - content = "["..message.source_channel.pylon.shortname.."] "..message.sender..": "..message.body, + content = message.author:name_with_shortname()..": "..message.body, }) end end |
