mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
Tunnel - Send message after close (#2507)
This commit is contained in:
parent
466b2b82d0
commit
0f9501f93a
@ -71,7 +71,7 @@ class Tunnel(metaclass=TunnelMeta):
|
|||||||
self.last_interaction = datetime.utcnow()
|
self.last_interaction = datetime.utcnow()
|
||||||
|
|
||||||
async def react_close(self, *, uid: int, message: str = ""):
|
async def react_close(self, *, uid: int, message: str = ""):
|
||||||
send_to = self.origin if uid == self.sender.id else self.sender
|
send_to = self.recipient if uid == self.sender.id else self.origin
|
||||||
closer = next(filter(lambda x: x.id == uid, (self.sender, self.recipient)), None)
|
closer = next(filter(lambda x: x.id == uid, (self.sender, self.recipient)), None)
|
||||||
await send_to.send(filter_mass_mentions(message.format(closer=closer)))
|
await send_to.send(filter_mass_mentions(message.format(closer=closer)))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user