Compare commits

...

5 Commits

Author SHA1 Message Date
Stijn De Clercq ce7f2eafd8
Merge pull request #165 from stijndcl/3.4.0
3.4.0
2023-02-02 21:37:11 +01:00
Stijn De Clercq c7b0bb8606
Merge pull request #163 from stijndcl/snipe-original
Make edit snipe keep the original message
2023-01-16 21:37:21 +01:00
Stijn De Clercq 73a9512339
Merge pull request #162 from stijndcl/sync-info
Add extra debug info to sync command
2023-01-16 21:34:39 +01:00
stijndcl 617e69b7a3 Keep the original message when sniping edits 2023-01-16 21:33:58 +01:00
stijndcl 29dcf845de Add extra debug info to sync command 2023-01-16 21:27:32 +01:00
2 changed files with 14 additions and 2 deletions

View File

@ -85,11 +85,17 @@ class Owner(commands.Cog):
if flags.copy_globals:
self.client.tree.copy_global_to(guild=guild)
await self.client.tree.sync(guild=guild)
synced_commands = await self.client.tree.sync(guild=guild)
else:
await self.client.tree.sync()
synced_commands = await self.client.tree.sync()
command_names = "\n".join([cmd.name for cmd in synced_commands])
await ctx.message.add_reaction("🔄")
await ctx.reply(
f"Successfully synced {len(synced_commands)} application commands: ```\n{command_names}\n```",
mention_author=False,
)
@commands.group(name="Add", aliases=["Create"], case_insensitive=True, invoke_without_command=False)
async def add_msg(self, ctx: commands.Context):

View File

@ -382,6 +382,12 @@ class Didier(commands.Bot):
if not should_snipe(before):
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] = (
before,
after,