|
20 | 20 | "footer": "Deleted message {cur} of {total}", |
21 | 21 | "sticker": "🎟️ Sticker: {name}", |
22 | 22 | "embed_msg": "*(had an embed)*", |
| 23 | + "cleared": "🧹 Cleared the snipe history for this channel.", |
| 24 | + "already_empty": "There's nothing to clear — no recently deleted messages in this channel.", |
23 | 25 | }, |
24 | 26 | "de": { |
25 | 27 | "empty": "Keine kürzlich gelöschten Nachrichten in diesem Kanal.", |
|
29 | 31 | "footer": "Gelöschte Nachricht {cur} von {total}", |
30 | 32 | "sticker": "🎟️ Aufkleber: {name}", |
31 | 33 | "embed_msg": "*(hatte einen Embed)*", |
| 34 | + "cleared": "🧹 Snipe-Verlauf für diesen Kanal wurde gelöscht.", |
| 35 | + "already_empty": "Es gibt nichts zu löschen — keine kürzlich gelöschten Nachrichten in diesem Kanal.", |
32 | 36 | }, |
33 | 37 | "es": { |
34 | 38 | "empty": "No hay mensajes eliminados recientemente en este canal.", |
|
38 | 42 | "footer": "Mensaje eliminado {cur} de {total}", |
39 | 43 | "sticker": "🎟️ Pegatina: {name}", |
40 | 44 | "embed_msg": "*(tenía un embed)*", |
| 45 | + "cleared": "🧹 Se borró el historial de mensajes cazados de este canal.", |
| 46 | + "already_empty": "No hay nada que borrar — no hay mensajes eliminados recientemente en este canal.", |
41 | 47 | }, |
42 | 48 | }, |
43 | 49 | "cafe": { |
|
49 | 55 | "footer": "deleted message {cur} of {total} · gone but not forgotten ☕", |
50 | 56 | "sticker": "🎟️ sticker: {name}", |
51 | 57 | "embed_msg": "*(had an embed — the mystery deepens ☕)*", |
| 58 | + "cleared": "🧹☕ swept the crumbs away — snipe history cleared for this channel.", |
| 59 | + "already_empty": "nothing to sweep up — this channel's already spotless ☕✨", |
52 | 60 | }, |
53 | 61 | "de": { |
54 | 62 | "empty": "hier wurde kürzlich nichts gelöscht — das café ist sauber ☕✨", |
|
58 | 66 | "footer": "gelöschte nachricht {cur} von {total} · weg, aber nicht vergessen ☕", |
59 | 67 | "sticker": "🎟️ aufkleber: {name}", |
60 | 68 | "embed_msg": "*(hatte einen embed — das rätsel vertieft sich ☕)*", |
| 69 | + "cleared": "🧹☕ krümel weggefegt — snipe-verlauf für diesen kanal gelöscht.", |
| 70 | + "already_empty": "nichts zu fegen — dieser kanal ist schon blitzsauber ☕✨", |
61 | 71 | }, |
62 | 72 | "es": { |
63 | 73 | "empty": "no se ha borrado nada por aquí últimamente — el café está limpio ☕✨", |
|
67 | 77 | "footer": "mensaje eliminado {cur} de {total} · ido pero no olvidado ☕", |
68 | 78 | "sticker": "🎟️ pegatina: {name}", |
69 | 79 | "embed_msg": "*(tenía un embed — el misterio se profundiza ☕)*", |
| 80 | + "cleared": "🧹☕ se barrieron las migas — historial de mensajes cazados borrado en este canal.", |
| 81 | + "already_empty": "nada que barrer — este canal ya está reluciente ☕✨", |
70 | 82 | }, |
71 | 83 | }, |
72 | 84 | } |
@@ -279,6 +291,24 @@ async def snipe(self, ctx: commands.Context): |
279 | 291 | view = SnipeView(entries=history, ctx=ctx) |
280 | 292 | await ctx.send(view=view, allowed_mentions=discord.AllowedMentions.none()) |
281 | 293 |
|
| 294 | + @commands.command( |
| 295 | + name="clearsnipe", |
| 296 | + aliases=["cs"], |
| 297 | + help="{ 'en': 'clear the deleted-message history for this channel ☕🧹', 'de': 'lösche den snipe-verlauf für diesen kanal' }" |
| 298 | + ) |
| 299 | + @commands.guild_only() |
| 300 | + @commands.has_permissions(manage_messages=True) |
| 301 | + async def clearsnipe(self, ctx: commands.Context): |
| 302 | + """Clear the stored deleted-message history for the current channel.""" |
| 303 | + had_history = bool(self._history.pop(ctx.channel.id, None)) |
| 304 | + key = "cleared" if had_history else "already_empty" |
| 305 | + |
| 306 | + view = discord.ui.LayoutView() |
| 307 | + view.add_item(discord.ui.Container( |
| 308 | + discord.ui.TextDisplay(content=msg_raw(ctx, key)) |
| 309 | + )) |
| 310 | + await ctx.send(view=view) |
| 311 | + |
282 | 312 |
|
283 | 313 | async def setup(bot): |
284 | 314 | await bot.add_cog(Snipe(bot)) |
0 commit comments