mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 10:17:59 -05:00
[i18n] Pass over bank, cleanup, customcom, dataconverter, downloader
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
@@ -16,7 +16,7 @@ _ = Translator("Cleanup", __file__)
|
||||
|
||||
@cog_i18n(_)
|
||||
class Cleanup(commands.Cog):
|
||||
"""Commands for cleaning messages"""
|
||||
"""Commands for cleaning messages."""
|
||||
|
||||
def __init__(self, bot: Red):
|
||||
super().__init__()
|
||||
@@ -104,7 +104,7 @@ class Cleanup(commands.Cog):
|
||||
@commands.group()
|
||||
@checks.mod_or_permissions(manage_messages=True)
|
||||
async def cleanup(self, ctx: commands.Context):
|
||||
"""Deletes messages."""
|
||||
"""Delete messages."""
|
||||
pass
|
||||
|
||||
@cleanup.command()
|
||||
@@ -112,16 +112,17 @@ class Cleanup(commands.Cog):
|
||||
async def text(
|
||||
self, ctx: commands.Context, text: str, number: int, delete_pinned: bool = False
|
||||
):
|
||||
"""Deletes last X messages matching the specified text.
|
||||
"""Delete the last X messages matching the specified text.
|
||||
|
||||
Example:
|
||||
cleanup text \"test\" 5
|
||||
`[p]cleanup text "test" 5`
|
||||
|
||||
Remember to use double quotes."""
|
||||
Remember to use double quotes.
|
||||
"""
|
||||
|
||||
channel = ctx.channel
|
||||
if not channel.permissions_for(ctx.guild.me).manage_messages:
|
||||
await ctx.send("I need the Manage Messages permission to do this.")
|
||||
await ctx.send(_("I need the Manage Messages permission to do this."))
|
||||
return
|
||||
|
||||
author = ctx.author
|
||||
@@ -159,14 +160,15 @@ class Cleanup(commands.Cog):
|
||||
async def user(
|
||||
self, ctx: commands.Context, user: str, number: int, delete_pinned: bool = False
|
||||
):
|
||||
"""Deletes last X messages from specified user.
|
||||
"""Delete the last X messages from a specified user.
|
||||
|
||||
Examples:
|
||||
cleanup user @\u200bTwentysix 2
|
||||
cleanup user Red 6"""
|
||||
`[p]cleanup user @\u200bTwentysix 2`
|
||||
`[p]cleanup user Red 6`
|
||||
"""
|
||||
channel = ctx.channel
|
||||
if not channel.permissions_for(ctx.guild.me).manage_messages:
|
||||
await ctx.send("I need the Manage Messages permission to do this.")
|
||||
await ctx.send(_("I need the Manage Messages permission to do this."))
|
||||
return
|
||||
|
||||
member = None
|
||||
@@ -214,7 +216,7 @@ class Cleanup(commands.Cog):
|
||||
@cleanup.command()
|
||||
@commands.guild_only()
|
||||
async def after(self, ctx: commands.Context, message_id: int, delete_pinned: bool = False):
|
||||
"""Deletes all messages after specified message.
|
||||
"""Delete all messages after a specified message.
|
||||
|
||||
To get a message id, enable developer mode in Discord's
|
||||
settings, 'appearance' tab. Then right click a message
|
||||
@@ -223,7 +225,7 @@ class Cleanup(commands.Cog):
|
||||
|
||||
channel = ctx.channel
|
||||
if not channel.permissions_for(ctx.guild.me).manage_messages:
|
||||
await ctx.send("I need the Manage Messages permission to do this.")
|
||||
await ctx.send(_("I need the Manage Messages permission to do this."))
|
||||
return
|
||||
author = ctx.author
|
||||
|
||||
@@ -280,14 +282,15 @@ class Cleanup(commands.Cog):
|
||||
@cleanup.command()
|
||||
@commands.guild_only()
|
||||
async def messages(self, ctx: commands.Context, number: int, delete_pinned: bool = False):
|
||||
"""Deletes last X messages.
|
||||
"""Delete the last X messages.
|
||||
|
||||
Example:
|
||||
cleanup messages 26"""
|
||||
`[p]cleanup messages 26`
|
||||
"""
|
||||
|
||||
channel = ctx.channel
|
||||
if not channel.permissions_for(ctx.guild.me).manage_messages:
|
||||
await ctx.send("I need the Manage Messages permission to do this.")
|
||||
await ctx.send(_("I need the Manage Messages permission to do this."))
|
||||
return
|
||||
author = ctx.author
|
||||
|
||||
@@ -311,11 +314,11 @@ class Cleanup(commands.Cog):
|
||||
@cleanup.command(name="bot")
|
||||
@commands.guild_only()
|
||||
async def cleanup_bot(self, ctx: commands.Context, number: int, delete_pinned: bool = False):
|
||||
"""Cleans up command messages and messages from the bot."""
|
||||
"""Clean up command messages and messages from the bot."""
|
||||
|
||||
channel = ctx.channel
|
||||
if not channel.permissions_for(ctx.guild.me).manage_messages:
|
||||
await ctx.send("I need the Manage Messages permission to do this.")
|
||||
await ctx.send(_("I need the Manage Messages permission to do this."))
|
||||
return
|
||||
author = ctx.message.author
|
||||
|
||||
@@ -369,7 +372,7 @@ class Cleanup(commands.Cog):
|
||||
match_pattern: str = None,
|
||||
delete_pinned: bool = False,
|
||||
):
|
||||
"""Cleans up messages owned by the bot.
|
||||
"""Clean up messages owned by the bot.
|
||||
|
||||
By default, all messages are cleaned. If a third argument is specified,
|
||||
it is used for pattern matching: If it begins with r( and ends with ),
|
||||
|
||||
Reference in New Issue
Block a user