mirror of https://github.com/stijndcl/didier
Keep the original message when sniping edits
parent
29dcf845de
commit
617e69b7a3
|
@ -382,6 +382,12 @@ class Didier(commands.Bot):
|
||||||
if not should_snipe(before):
|
if not should_snipe(before):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# If the edited message is currently present in the snipe cache,
|
||||||
|
# don't update the <before>, but instead change the <after>
|
||||||
|
existing = self.sniped.get(before.channel.id, None)
|
||||||
|
if existing is not None and existing[0].id == before.id:
|
||||||
|
before = existing[0]
|
||||||
|
|
||||||
self.sniped[before.channel.id] = (
|
self.sniped[before.channel.id] = (
|
||||||
before,
|
before,
|
||||||
after,
|
after,
|
||||||
|
|
Loading…
Reference in New Issue