diff --git a/redbot/cogs/cleanup/cleanup.py b/redbot/cogs/cleanup/cleanup.py index 88a38a27e..196c074a8 100644 --- a/redbot/cogs/cleanup/cleanup.py +++ b/redbot/cogs/cleanup/cleanup.py @@ -194,7 +194,7 @@ class Cleanup(commands.Cog): """Delete the last X messages matching the specified text in the current channel. Example: - - `[p]cleanup text "test" 5` + - `[p]cleanup text "test" 5` Remember to use double quotes. @@ -254,8 +254,8 @@ class Cleanup(commands.Cog): """Delete the last X messages from a specified user in the current channel. Examples: - - `[p]cleanup user @Twentysix 2` - - `[p]cleanup user Red 6` + - `[p]cleanup user @Twentysix 2` + - `[p]cleanup user Red 6` **Arguments:** @@ -436,7 +436,7 @@ class Cleanup(commands.Cog): The first message ID should be the older message and the second one the newer. Example: - - `[p]cleanup between 123456789123456789 987654321987654321` + - `[p]cleanup between 123456789123456789 987654321987654321` **Arguments:** @@ -483,7 +483,7 @@ class Cleanup(commands.Cog): """Delete the last X messages in the current channel. Example: - - `[p]cleanup messages 26` + - `[p]cleanup messages 26` **Arguments:** @@ -614,9 +614,9 @@ class Cleanup(commands.Cog): it is used for pattern matching - only messages containing the given text will be deleted. Examples: - - `[p]cleanup self 6` - - `[p]cleanup self 10 Pong` - - `[p]cleanup self 7 "" True` + - `[p]cleanup self 6` + - `[p]cleanup self 10 Pong` + - `[p]cleanup self 7 "" True` **Arguments:** diff --git a/redbot/cogs/customcom/customcom.py b/redbot/cogs/customcom/customcom.py index 3bb9425d5..b9d8b536d 100644 --- a/redbot/cogs/customcom/customcom.py +++ b/redbot/cogs/customcom/customcom.py @@ -402,7 +402,7 @@ class CustomCommands(commands.Cog): """Add a simple custom command. Example: - - `[p]customcom create simple yourcommand Text you want` + - `[p]customcom create simple yourcommand Text you want` **Arguments:** @@ -447,9 +447,9 @@ class CustomCommands(commands.Cog): custom command. Examples: - - `[p]customcom cooldown pingrole` - - `[p]customcom cooldown yourcommand 30` - - `[p]cc cooldown mycommand 30 guild` + - `[p]customcom cooldown pingrole` + - `[p]customcom cooldown yourcommand 30` + - `[p]cc cooldown mycommand 30 guild` **Arguments:** @@ -492,7 +492,7 @@ class CustomCommands(commands.Cog): """Delete a custom command. Example: - - `[p]customcom delete yourcommand` + - `[p]customcom delete yourcommand` **Arguments:** @@ -510,7 +510,7 @@ class CustomCommands(commands.Cog): """Edit a custom command. Example: - - `[p]customcom edit yourcommand Text you want` + - `[p]customcom edit yourcommand Text you want` **Arguments:** diff --git a/redbot/cogs/downloader/downloader.py b/redbot/cogs/downloader/downloader.py index a8dbfb23e..03aa99008 100644 --- a/redbot/cogs/downloader/downloader.py +++ b/redbot/cogs/downloader/downloader.py @@ -486,8 +486,8 @@ class Downloader(commands.Cog): Install a group of dependencies using pip. Examples: - - `[p]pipinstall bs4` - - `[p]pipinstall py-cpuinfo psutil` + - `[p]pipinstall bs4` + - `[p]pipinstall py-cpuinfo psutil` Improper usage of this command can break your bot, be careful. @@ -526,8 +526,8 @@ class Downloader(commands.Cog): """Add a new repo. Examples: - - `[p]repo add 26-Cogs https://github.com/Twentysix26/x26-Cogs` - - `[p]repo add Laggrons-Dumb-Cogs https://github.com/retke/Laggrons-Dumb-Cogs v3` + - `[p]repo add 26-Cogs https://github.com/Twentysix26/x26-Cogs` + - `[p]repo add Laggrons-Dumb-Cogs https://github.com/retke/Laggrons-Dumb-Cogs v3` Repo names can only contain characters A-z, numbers, underscores, hyphens, and dots (but they cannot start or end with a dot). @@ -597,8 +597,8 @@ class Downloader(commands.Cog): Remove repos and their files. Examples: - - `[p]repo delete 26-Cogs` - - `[p]repo delete 26-Cogs Laggrons-Dumb-Cogs` + - `[p]repo delete 26-Cogs` + - `[p]repo delete 26-Cogs Laggrons-Dumb-Cogs` **Arguments** @@ -639,7 +639,7 @@ class Downloader(commands.Cog): """Show information about a repo. Example: - - `[p]repo info 26-Cogs` + - `[p]repo info 26-Cogs` **Arguments** @@ -667,9 +667,9 @@ class Downloader(commands.Cog): This will *not* update the cogs installed from those repos. Examples: - - `[p]repo update` - - `[p]repo update 26-Cogs` - - `[p]repo update 26-Cogs Laggrons-Dumb-Cogs` + - `[p]repo update` + - `[p]repo update 26-Cogs` + - `[p]repo update 26-Cogs Laggrons-Dumb-Cogs` **Arguments** @@ -768,8 +768,8 @@ class Downloader(commands.Cog): """Install a cog from the given repo. Examples: - - `[p]cog install 26-Cogs defender` - - `[p]cog install Laggrons-Dumb-Cogs say roleinvite` + - `[p]cog install 26-Cogs defender` + - `[p]cog install Laggrons-Dumb-Cogs say roleinvite` **Arguments** @@ -792,7 +792,7 @@ class Downloader(commands.Cog): Older revisions can be found in the URL bar by [viewing the commit history of any repo](https://cdn.discordapp.com/attachments/133251234164375552/775760247787749406/unknown.png) Example: - - `[p]cog installversion Broken-Repo e798cc268e199612b1316a3d1f193da0770c7016 cog_name` + - `[p]cog installversion Broken-Repo e798cc268e199612b1316a3d1f193da0770c7016 cog_name` **Arguments** @@ -919,8 +919,8 @@ class Downloader(commands.Cog): by Downloader. Examples: - - `[p]cog uninstall defender` - - `[p]cog uninstall say roleinvite` + - `[p]cog uninstall defender` + - `[p]cog uninstall say roleinvite` **Arguments** @@ -990,8 +990,8 @@ class Downloader(commands.Cog): """Pin cogs - this will lock cogs on their current version. Examples: - - `[p]cog pin defender` - - `[p]cog pin outdated_cog1 outdated_cog2` + - `[p]cog pin defender` + - `[p]cog pin outdated_cog1 outdated_cog2` **Arguments** @@ -1025,8 +1025,8 @@ class Downloader(commands.Cog): """Unpin cogs - this will remove the update lock from those cogs. Examples: - - `[p]cog unpin defender` - - `[p]cog unpin updated_cog1 updated_cog2` + - `[p]cog unpin defender` + - `[p]cog unpin updated_cog1 updated_cog2` **Arguments** @@ -1127,10 +1127,10 @@ class Downloader(commands.Cog): """Update all cogs, or ones of your choosing. Examples: - - `[p]cog update` - - `[p]cog update True` - - `[p]cog update defender` - - `[p]cog update True defender` + - `[p]cog update` + - `[p]cog update True` + - `[p]cog update defender` + - `[p]cog update True defender` **Arguments** @@ -1148,9 +1148,9 @@ class Downloader(commands.Cog): """Update all cogs from repos of your choosing. Examples: - - `[p]cog updateallfromrepos 26-Cogs` - - `[p]cog updateallfromrepos True 26-Cogs` - - `[p]cog updateallfromrepos Laggrons-Dumb-Cogs 26-Cogs` + - `[p]cog updateallfromrepos 26-Cogs` + - `[p]cog updateallfromrepos True 26-Cogs` + - `[p]cog updateallfromrepos Laggrons-Dumb-Cogs 26-Cogs` **Arguments** @@ -1179,8 +1179,8 @@ class Downloader(commands.Cog): See `[p]cog installversion` for an explanation of `revision`. Examples: - - `[p]cog updatetoversion Broken-Repo e798cc268e199612b1316a3d1f193da0770c7016 cog_name` - - `[p]cog updatetoversion True Broken-Repo 6107c0770ad391f1d3a6131b216991e862cc897e cog_name` + - `[p]cog updatetoversion Broken-Repo e798cc268e199612b1316a3d1f193da0770c7016 cog_name` + - `[p]cog updatetoversion True Broken-Repo 6107c0770ad391f1d3a6131b216991e862cc897e cog_name` **Arguments** @@ -1319,7 +1319,7 @@ class Downloader(commands.Cog): """List all available cogs from a single repo. Example: - - `[p]cog list 26-Cogs` + - `[p]cog list 26-Cogs` **Arguments** @@ -1360,7 +1360,7 @@ class Downloader(commands.Cog): """List information about a single cog. Example: - - `[p]cog info 26-Cogs defender` + - `[p]cog info 26-Cogs defender` **Arguments** @@ -1732,7 +1732,7 @@ class Downloader(commands.Cog): This will only work with loaded cogs. Example: - - `[p]findcog ping` + - `[p]findcog ping` **Arguments** diff --git a/redbot/cogs/economy/economy.py b/redbot/cogs/economy/economy.py index 032651951..11bc1bb05 100644 --- a/redbot/cogs/economy/economy.py +++ b/redbot/cogs/economy/economy.py @@ -185,8 +185,8 @@ class Economy(commands.Cog): """Show the user's account balance. Example: - - `[p]bank balance` - - `[p]bank balance @Twentysix` + - `[p]bank balance` + - `[p]bank balance @Twentysix` **Arguments** @@ -211,7 +211,7 @@ class Economy(commands.Cog): This will come out of your balance, so make sure you have enough. Example: - - `[p]bank transfer @Twentysix 500` + - `[p]bank transfer @Twentysix 500` **Arguments** @@ -244,9 +244,9 @@ class Economy(commands.Cog): Putting + or - signs before the amount will add/remove currency on the user's bank account instead. Examples: - - `[p]bank set @Twentysix 26` - Sets balance to 26 - - `[p]bank set @Twentysix +2` - Increases balance by 2 - - `[p]bank set @Twentysix -6` - Decreases balance by 6 + - `[p]bank set @Twentysix 26` - Sets balance to 26 + - `[p]bank set @Twentysix +2` - Increases balance by 2 + - `[p]bank set @Twentysix -6` - Decreases balance by 6 **Arguments** @@ -412,9 +412,9 @@ class Economy(commands.Cog): Defaults to top 10. Examples: - - `[p]leaderboard` - - `[p]leaderboard 50` - Shows the top 50 instead of top 10. - - `[p]leaderboard 100 yes` - Shows the top 100 from all servers. + - `[p]leaderboard` + - `[p]leaderboard 50` - Shows the top 50 instead of top 10. + - `[p]leaderboard 100 yes` - Shows the top 100 from all servers. **Arguments** @@ -535,7 +535,7 @@ class Economy(commands.Cog): """Use the slot machine. Example: - - `[p]slot 50` + - `[p]slot 50` **Arguments** @@ -700,7 +700,7 @@ class Economy(commands.Cog): """Set the minimum slot machine bid. Example: - - `[p]economyset slotmin 10` + - `[p]economyset slotmin 10` **Arguments** @@ -735,7 +735,7 @@ class Economy(commands.Cog): """Set the maximum slot machine bid. Example: - - `[p]economyset slotmax 50` + - `[p]economyset slotmax 50` **Arguments** @@ -772,8 +772,8 @@ class Economy(commands.Cog): """Set the cooldown for the slot machine. Examples: - - `[p]economyset slottime 10` - - `[p]economyset slottime 10m` + - `[p]economyset slottime 10` + - `[p]economyset slottime 10m` **Arguments** @@ -795,8 +795,8 @@ class Economy(commands.Cog): """Set the cooldown for the payday command. Examples: - - `[p]economyset paydaytime 86400` - - `[p]economyset paydaytime 1d` + - `[p]economyset paydaytime 86400` + - `[p]economyset paydaytime 1d` **Arguments** @@ -820,7 +820,7 @@ class Economy(commands.Cog): """Set the amount earned each payday. Example: - - `[p]economyset paydayamount 400` + - `[p]economyset paydayamount 400` **Arguments** @@ -854,7 +854,7 @@ class Economy(commands.Cog): Only available when not using a global bank. Example: - - `[p]economyset rolepaydayamount @Members 400` + - `[p]economyset rolepaydayamount @Members 400` **Arguments** diff --git a/redbot/cogs/filter/filter.py b/redbot/cogs/filter/filter.py index c8cc2c2d9..04ba0054e 100644 --- a/redbot/cogs/filter/filter.py +++ b/redbot/cogs/filter/filter.py @@ -95,7 +95,7 @@ class Filter(commands.Cog): The default name used is *John Doe*. Example: - - `[p]filterset defaultname Missingno` + - `[p]filterset defaultname Missingno` **Arguments:** @@ -115,8 +115,8 @@ class Filter(commands.Cog): Set both to zero to disable autoban. Examples: - - `[p]filterset ban 5 5` - Ban users who say 5 filtered words in 5 seconds. - - `[p]filterset ban 2 20` - Ban users who say 2 filtered words in 20 seconds. + - `[p]filterset ban 5 5` - Ban users who say 5 filtered words in 5 seconds. + - `[p]filterset ban 2 20` - Ban users who say 2 filtered words in 20 seconds. **Arguments:** @@ -264,8 +264,8 @@ class Filter(commands.Cog): Use double quotes to add sentences. Examples: - - `[p]filter channel add #channel word1 word2 word3` - - `[p]filter channel add #channel "This is a sentence"` + - `[p]filter channel add #channel word1 word2 word3` + - `[p]filter channel add #channel "This is a sentence"` **Arguments:** @@ -293,8 +293,8 @@ class Filter(commands.Cog): Use double quotes to remove sentences. Examples: - - `[p]filter channel remove #channel word1 word2 word3` - - `[p]filter channel remove #channel "This is a sentence"` + - `[p]filter channel remove #channel word1 word2 word3` + - `[p]filter channel remove #channel "This is a sentence"` **Arguments:** @@ -315,8 +315,8 @@ class Filter(commands.Cog): Use double quotes to add sentences. Examples: - - `[p]filter add word1 word2 word3` - - `[p]filter add "This is a sentence"` + - `[p]filter add word1 word2 word3` + - `[p]filter add "This is a sentence"` **Arguments:** @@ -337,8 +337,8 @@ class Filter(commands.Cog): Use double quotes to remove sentences. Examples: - - `[p]filter remove word1 word2 word3` - - `[p]filter remove "This is a sentence"` + - `[p]filter remove word1 word2 word3` + - `[p]filter remove "This is a sentence"` **Arguments:** diff --git a/redbot/cogs/mod/kickban.py b/redbot/cogs/mod/kickban.py index 5a7cc84c1..600461e91 100644 --- a/redbot/cogs/mod/kickban.py +++ b/redbot/cogs/mod/kickban.py @@ -889,9 +889,9 @@ class KickBanMixin(MixinMeta): """Unban a user from this server. Requires specifying the target user's ID. To find this, you may either: - 1. Copy it from the mod log case (if one was created), or - 2. enable developer mode, go to Bans in this server's settings, right- - click the user and select 'Copy ID'.""" + 1. Copy it from the mod log case (if one was created), or + 2. Enable Developer Mode, go to Bans in this server's settings, right-click the user and select 'Copy ID'. + """ guild = ctx.guild author = ctx.author audit_reason = get_audit_reason(ctx.author, reason, shorten=True) diff --git a/redbot/cogs/mod/settings.py b/redbot/cogs/mod/settings.py index 9f4d86bc5..7ddf7976f 100644 --- a/redbot/cogs/mod/settings.py +++ b/redbot/cogs/mod/settings.py @@ -473,8 +473,8 @@ class ModSettings(MixinMeta): """Delete all stored usernames and nicknames. Examples: - - `[p]modset deletenames` - Did not confirm. Shows the help message. - - `[p]modset deletenames yes` - Deletes all stored usernames and nicknames. + - `[p]modset deletenames` - Did not confirm. Shows the help message. + - `[p]modset deletenames yes` - Deletes all stored usernames and nicknames. **Arguments** diff --git a/redbot/cogs/permissions/permissions.py b/redbot/cogs/permissions/permissions.py index 0db134a38..44d7de4c0 100644 --- a/redbot/cogs/permissions/permissions.py +++ b/redbot/cogs/permissions/permissions.py @@ -220,12 +220,12 @@ class Permissions(commands.Cog): "checking for the default restrictions of the command.\n" "Global rules (set by the owner) are checked first, then rules set for servers. If " "multiple global or server rules apply to the case, the order they are checked in is:\n" - " 1. Rules about a user.\n" - " 2. Rules about the voice/stage channel a user is connected to.\n" - " 3. Rules about the channel or a parent of the thread a command was issued in.\n" - " 4. Rules about a role the user has (The highest role they have with a rule will be " + "1. Rules about a user.\n" + "2. Rules about the voice/stage channel a user is connected to.\n" + "3. Rules about the channel or a parent of the thread a command was issued in.\n" + "4. Rules about a role the user has (The highest role they have with a rule will be " "used).\n" - " 5. Rules about the server a user is in (Global rules only).\n\n" + "5. Rules about the server a user is in (Global rules only).\n\n" "For more details, please read the [official documentation]" "(https://docs.discord.red/en/stable/cog_permissions.html)." ) diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index 86bb9883a..47188e37c 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -576,7 +576,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Find out what type of data [botname] stores and why. **Example:** - - `[p]mydata whatdata` + - `[p]mydata whatdata` """ ver = "latest" if red_version_info.dev_release else "stable" @@ -606,7 +606,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): This will send an attachment with the End User Data statements of all loaded 3rd party cogs. **Example:** - - `[p]mydata 3rdparty` + - `[p]mydata 3rdparty` """ # Can't check this as a command check, and want to prompt DMs as an option. @@ -700,7 +700,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Further interactions with [botname] may cause it to learn about you again. **Example:** - - `[p]mydata forgetme` + - `[p]mydata forgetme` """ if ctx.assume_yes: # lol, no, we're not letting users schedule deletions every day to thrash the bot. @@ -813,7 +813,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Opposite of `[p]mydata ownermanagement disallowuserdeletions` **Example:** - - `[p]mydata ownermanagement allowuserdeletions` + - `[p]mydata ownermanagement allowuserdeletions` """ await ctx.bot._config.datarequests.allow_user_requests.set(True) await ctx.send( @@ -831,7 +831,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Opposite of `[p]mydata ownermanagement allowuserdeletions` **Example:** - - `[p]mydata ownermanagement disallowuserdeletions` + - `[p]mydata ownermanagement disallowuserdeletions` """ await ctx.bot._config.datarequests.allow_user_requests.set(False) await ctx.send(_("User can not delete their own data.")) @@ -842,14 +842,14 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Sets how user deletions are treated. **Example:** - - `[p]mydata ownermanagement setuserdeletionlevel 1` + - `[p]mydata ownermanagement setuserdeletionlevel 1` **Arguments:** - - `` - The strictness level for user deletion. See Level guide below. + - `` - The strictness level for user deletion. See Level guide below. Level: - - `0`: What users can delete is left entirely up to each cog. - - `1`: Cogs should delete anything the cog doesn't need about the user. + - `0`: What users can delete is left entirely up to each cog. + - `1`: Cogs should delete anything the cog doesn't need about the user. """ if level == 1: @@ -883,7 +883,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): If you are processing a manual request from a user, you may want `[p]mydata ownermanagement deleteforuser` instead. **Arguments:** - - `` - The id of the user whose data would be deleted. + - `` - The id of the user whose data would be deleted. """ if not await self.get_serious_confirmation( @@ -960,7 +960,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): This is a mostly safe operation, but you should not use it unless processing a request from this user as it may impact their usage of the bot. **Arguments:** - - `` - The id of the user whose data would be deleted. + - `` - The id of the user whose data would be deleted. """ if not await self.get_serious_confirmation( ctx, @@ -1045,7 +1045,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): This may include more than just end user data, including anti abuse records. **Arguments:** - - `` - The id of the user whose data would be deleted. + - `` - The id of the user whose data would be deleted. """ if not await self.get_serious_confirmation( ctx, @@ -1117,17 +1117,18 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): The default is to use embeds. The embed settings are checked until the first True/False in this order: - - In guild context: - 1. Channel override - `[p]embedset channel` - 2. Server command override - `[p]embedset command server` - 3. Server override - `[p]embedset server` - 4. Global command override - `[p]embedset command global` - 5. Global setting -`[p]embedset global` - - In DM context: - 1. User override - `[p]embedset user` - 2. Global command override - `[p]embedset command global` - 3. Global setting - `[p]embedset global` + - In guild context: + 1. Channel override - `[p]embedset channel` + 2. Server command override - `[p]embedset command server` + 3. Server override - `[p]embedset server` + 4. Global command override - `[p]embedset command global` + 5. Global setting -`[p]embedset global` + + - In DM context: + 1. User override - `[p]embedset user` + 2. Global command override - `[p]embedset command global` + 3. Global setting - `[p]embedset global` """ @embedset.command(name="showsettings") @@ -1140,12 +1141,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Provide a command name to check for command specific embed settings. **Examples:** - - `[p]embedset showsettings` - Shows embed settings. - - `[p]embedset showsettings info` - Also shows embed settings for the 'info' command. - - `[p]embedset showsettings "ignore list"` - Checking subcommands requires quotes. + - `[p]embedset showsettings` - Shows embed settings. + - `[p]embedset showsettings info` - Also shows embed settings for the 'info' command. + - `[p]embedset showsettings "ignore list"` - Checking subcommands requires quotes. **Arguments:** - - `[command]` - Checks this command for command specific embed settings. + - `[command]` - Checks this command for command specific embed settings. """ # qualified name might be different if alias was passed to this command command_name = command and command.qualified_name @@ -1192,7 +1193,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): To see full evaluation order of embed settings, run `[p]help embedset`. **Example:** - - `[p]embedset global` + - `[p]embedset global` """ current = await self.bot._config.embeds() if current: @@ -1217,11 +1218,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): To see full evaluation order of embed settings, run `[p]help embedset`. **Examples:** - - `[p]embedset server False` - Disables embeds on this server. - - `[p]embedset server` - Resets value to use global default. + - `[p]embedset server False` - Disables embeds on this server. + - `[p]embedset server` - Resets value to use global default. **Arguments:** - - `[enabled]` - Whether to use embeds on this server. Leave blank to reset to default. + - `[enabled]` - Whether to use embeds on this server. Leave blank to reset to default. """ if enabled is None: await self.bot._config.guild(ctx.guild).embeds.clear() @@ -1251,12 +1252,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): To see full evaluation order of embed settings, run `[p]help embedset`. **Examples:** - - `[p]embedset command info` - Clears command specific embed settings for 'info'. - - `[p]embedset command info False` - Disables embeds for 'info'. - - `[p]embedset command "ignore list" True` - Quotes are needed for subcommands. + - `[p]embedset command info` - Clears command specific embed settings for 'info'. + - `[p]embedset command info False` - Disables embeds for 'info'. + - `[p]embedset command "ignore list" True` - Quotes are needed for subcommands. **Arguments:** - - `[enabled]` - Whether to use embeds for this command. Leave blank to reset to default. + - `[enabled]` - Whether to use embeds for this command. Leave blank to reset to default. """ # Select the scope based on the author's privileges if await ctx.bot.is_owner(ctx.author): @@ -1290,12 +1291,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): To see full evaluation order of embed settings, run `[p]help embedset`. **Examples:** - - `[p]embedset command global info` - Clears command specific embed settings for 'info'. - - `[p]embedset command global info False` - Disables embeds for 'info'. - - `[p]embedset command global "ignore list" True` - Quotes are needed for subcommands. + - `[p]embedset command global info` - Clears command specific embed settings for 'info'. + - `[p]embedset command global info False` - Disables embeds for 'info'. + - `[p]embedset command global "ignore list" True` - Quotes are needed for subcommands. **Arguments:** - - `[enabled]` - Whether to use embeds for this command. Leave blank to reset to default. + - `[enabled]` - Whether to use embeds for this command. Leave blank to reset to default. """ self._check_if_command_requires_embed_links(command) # qualified name might be different if alias was passed to this command @@ -1335,12 +1336,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): To see full evaluation order of embed settings, run `[p]help embedset`. **Examples:** - - `[p]embedset command server info` - Clears command specific embed settings for 'info'. - - `[p]embedset command server info False` - Disables embeds for 'info'. - - `[p]embedset command server "ignore list" True` - Quotes are needed for subcommands. + - `[p]embedset command server info` - Clears command specific embed settings for 'info'. + - `[p]embedset command server info False` - Disables embeds for 'info'. + - `[p]embedset command server "ignore list" True` - Quotes are needed for subcommands. **Arguments:** - - `[enabled]` - Whether to use embeds for this command. Leave blank to reset to default. + - `[enabled]` - Whether to use embeds for this command. Leave blank to reset to default. """ self._check_if_command_requires_embed_links(command) # qualified name might be different if alias was passed to this command @@ -1387,9 +1388,9 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): To see full evaluation order of embed settings, run `[p]help embedset`. **Examples:** - - `[p]embedset channel #text-channel False` - Disables embeds in the #text-channel. - - `[p]embedset channel #forum-channel disable` - Disables embeds in the #forum-channel. - - `[p]embedset channel #text-channel` - Resets value to use guild default in the #text-channel. + - `[p]embedset channel #text-channel False` - Disables embeds in the #text-channel. + - `[p]embedset channel #forum-channel disable` - Disables embeds in the #forum-channel. + - `[p]embedset channel #text-channel` - Resets value to use guild default in the #text-channel. **Arguments:** - `` - The text, voice, stage, or forum channel to set embed setting for. @@ -1420,11 +1421,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): To see full evaluation order of embed settings, run `[p]help embedset`. **Examples:** - - `[p]embedset user False` - Disables embeds in your DMs. - - `[p]embedset user` - Resets value to use global default. + - `[p]embedset user False` - Disables embeds in your DMs. + - `[p]embedset user` - Resets value to use global default. **Arguments:** - - `[enabled]` - Whether to use embeds in your DMs. Leave blank to reset to default. + - `[enabled]` - Whether to use embeds in your DMs. Leave blank to reset to default. """ if enabled is None: await self.bot._config.user(ctx.author).embeds.clear() @@ -1448,11 +1449,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Warning: Sending the traceback publicly can accidentally reveal sensitive information about your computer or configuration. **Examples:** - - `[p]traceback` - Sends the traceback to your DMs. - - `[p]traceback True` - Sends the last traceback in the current context. + - `[p]traceback` - Sends the traceback to your DMs. + - `[p]traceback True` - Sends the last traceback in the current context. **Arguments:** - - `[public]` - Whether to send the traceback to the current context. Leave blank to send to your DMs. + - `[public]` - Whether to send the traceback to the current context. Leave blank to send to your DMs. """ channel = ctx.channel if public else ctx.author @@ -1485,7 +1486,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): This command is locked to the owner unless `[p]inviteset public` is set to True. **Example:** - - `[p]invite` + - `[p]invite` """ message = await self.bot.get_invite_url() if (admin := self.bot.get_cog("Admin")) and await admin.config.serverlocked(): @@ -1518,10 +1519,10 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): The bot must be made into a `Public bot` in the developer dashboard for public invites to work. **Example:** - - `[p]inviteset public yes` - Toggles the public invite setting. + - `[p]inviteset public yes` - Toggles the public invite setting. **Arguments:** - - `[confirm]` - Required to set to public. Not required to toggle back to private. + - `[confirm]` - Required to set to public. Not required to toggle back to private. """ if await self.bot._config.invite_public(): await self.bot._config.invite_public.set(False) @@ -1560,10 +1561,10 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Please note that you might need two factor authentication for some permissions. **Example:** - - `[p]inviteset perms 134217728` - Adds a "Manage Nicknames" permission requirement to the invite. + - `[p]inviteset perms 134217728` - Adds a "Manage Nicknames" permission requirement to the invite. **Arguments:** - - `` - The permission level to require for the bot in the generated invite. + - `` - The permission level to require for the bot in the generated invite. """ await self.bot._config.invite_perm.set(level) await ctx.send("The new permissions level has been set.") @@ -1599,12 +1600,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Note: This command is interactive. **Examples:** - - `[p]leave` - Leave the current server. - - `[p]leave "Red - Discord Bot"` - Quotes are necessary when there are spaces in the name. - - `[p]leave 133049272517001216 240154543684321280` - Leaves multiple servers, using IDs. + - `[p]leave` - Leave the current server. + - `[p]leave "Red - Discord Bot"` - Quotes are necessary when there are spaces in the name. + - `[p]leave 133049272517001216 240154543684321280` - Leaves multiple servers, using IDs. **Arguments:** - - `[servers...]` - The servers to leave. When blank, attempts to leave the current server. + - `[servers...]` - The servers to leave. When blank, attempts to leave the current server. """ guilds = servers if ctx.guild is None and not guilds: @@ -1702,11 +1703,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Additional cogs can be added using Downloader, or from local paths using `[p]addpath`. **Examples:** - - `[p]load general` - Loads the `general` cog. - - `[p]load admin mod mutes` - Loads multiple cogs. + - `[p]load general` - Loads the `general` cog. + - `[p]load admin mod mutes` - Loads multiple cogs. **Arguments:** - - `` - The cog packages to load. + - `` - The cog packages to load. """ cogs = tuple(map(lambda cog: cog.rstrip(","), cogs)) async with ctx.typing(): @@ -1813,11 +1814,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): See packages available to unload with `[p]cogs`. **Examples:** - - `[p]unload general` - Unloads the `general` cog. - - `[p]unload admin mod mutes` - Unloads multiple cogs. + - `[p]unload general` - Unloads the `general` cog. + - `[p]unload admin mod mutes` - Unloads multiple cogs. **Arguments:** - - `` - The cog packages to unload. + - `` - The cog packages to unload. """ cogs = tuple(map(lambda cog: cog.rstrip(","), cogs)) outcomes = await self._unload(cogs) @@ -1861,11 +1862,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Cogs that were not loaded will only be loaded. **Examples:** - - `[p]reload general` - Unloads then loads the `general` cog. - - `[p]reload admin mod mutes` - Unloads then loads multiple cogs. + - `[p]reload general` - Unloads then loads the `general` cog. + - `[p]reload admin mod mutes` - Unloads then loads multiple cogs. **Arguments:** - - `` - The cog packages to reload. + - `` - The cog packages to reload. """ cogs = tuple(map(lambda cog: cog.rstrip(","), cogs)) async with ctx.typing(): @@ -2392,11 +2393,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): This is the recommended method for shutting down the bot. **Examples:** - - `[p]shutdown` - - `[p]shutdown True` - Shutdowns silently. + - `[p]shutdown` + - `[p]shutdown True` - Shutdowns silently. **Arguments:** - - `[silently]` - Whether to skip sending the shutdown message. Defaults to False. + - `[silently]` - Whether to skip sending the shutdown message. Defaults to False. """ wave = "\N{WAVING HAND SIGN}" skin = "\N{EMOJI MODIFIER FITZPATRICK TYPE-3}" @@ -2414,11 +2415,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): The restart is not guaranteed: it must be dealt with by the process manager in use. **Examples:** - - `[p]restart` - - `[p]restart True` - Restarts silently. + - `[p]restart` + - `[p]restart True` - Restarts silently. **Arguments:** - - `[silently]` - Whether to skip sending the restart message. Defaults to False. + - `[silently]` - Whether to skip sending the restart message. Defaults to False. """ with contextlib.suppress(discord.HTTPException): if not silently: @@ -2524,7 +2525,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): """Set the initial balance for new bank accounts. Example: - - `[p]bankset registeramount 5000` + - `[p]bankset registeramount 5000` **Arguments** @@ -2554,8 +2555,8 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): """Delete all bank accounts. Examples: - - `[p]bankset reset` - Did not confirm. Shows the help message. - - `[p]bankset reset yes` + - `[p]bankset reset` - Did not confirm. Shows the help message. + - `[p]bankset reset yes` **Arguments** @@ -2595,8 +2596,8 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Cannot be used with a global bank. See `[p]bankset prune global`. Examples: - - `[p]bankset prune server` - Did not confirm. Shows the help message. - - `[p]bankset prune server yes` + - `[p]bankset prune server` - Did not confirm. Shows the help message. + - `[p]bankset prune server yes` **Arguments** @@ -2628,8 +2629,8 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Cannot be used without a global bank. See `[p]bankset prune server`. Examples: - - `[p]bankset prune global` - Did not confirm. Shows the help message. - - `[p]bankset prune global yes` + - `[p]bankset prune global` - Did not confirm. Shows the help message. + - `[p]bankset prune global yes` **Arguments** @@ -2666,8 +2667,8 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): """Delete the bank account of a specified user. Examples: - - `[p]bankset prune user @Twentysix` - Did not confirm. Shows the help message. - - `[p]bankset prune user @Twentysix yes` + - `[p]bankset prune user @Twentysix` - Did not confirm. Shows the help message. + - `[p]bankset prune user @Twentysix yes` **Arguments** @@ -2820,11 +2821,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): The default is "Red V3". **Examples:** - - `[p]set bot description` - Resets the description to the default setting. - - `[p]set bot description MyBot: A Red V3 Bot` + - `[p]set bot description` - Resets the description to the default setting. + - `[p]set bot description MyBot: A Red V3 Bot` **Arguments:** - - `[description]` - The description to use for this bot. Leave blank to reset to the default. + - `[description]` - The description to use for this bot. Leave blank to reset to the default. """ if not description: await ctx.bot._config.description.clear() @@ -2850,12 +2851,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Supports either an attachment or an image URL. **Examples:** - - `[p]set bot avatar` - With an image attachment, this will set the avatar. - - `[p]set bot avatar` - Without an attachment, this will show the command help. - - `[p]set bot avatar https://links.flaree.xyz/k95` - Sets the avatar to the provided url. + - `[p]set bot avatar` - With an image attachment, this will set the avatar. + - `[p]set bot avatar` - Without an attachment, this will show the command help. + - `[p]set bot avatar https://links.flaree.xyz/k95` - Sets the avatar to the provided url. **Arguments:** - - `[url]` - An image url to be used as an avatar. Leave blank when uploading an attachment. + - `[url]` - An image url to be used as an avatar. Leave blank when uploading an attachment. """ if len(ctx.message.attachments) > 0: # Attachments take priority data = await ctx.message.attachments[0].read() @@ -2898,7 +2899,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Removes [botname]'s avatar. **Example:** - - `[p]set bot avatar remove` + - `[p]set bot avatar remove` """ async with ctx.typing(): await ctx.bot.user.edit(avatar=None) @@ -2915,10 +2916,10 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Please contact Discord support to change it. **Example:** - - `[p]set bot username BaguetteBot` + - `[p]set bot username BaguetteBot` **Arguments:** - - `` - The username to give the bot. + - `` - The username to give the bot. """ try: if self.bot.user.public_flags.verified_bot: @@ -2969,10 +2970,10 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Maximum length for a nickname is 32 characters. **Example:** - - `[p]set bot nickname 🎃 SpookyBot 🎃` + - `[p]set bot nickname 🎃 SpookyBot 🎃` **Arguments:** - - `[nickname]` - The nickname to give the bot. Leave blank to clear the current nickname. + - `[nickname]` - The nickname to give the bot. Leave blank to clear the current nickname. """ try: if nickname and len(nickname) > 32: @@ -2995,12 +2996,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Link example: `[My link](https://example.com)` **Examples:** - - `[p]set bot custominfo >>> I can use **markdown** such as quotes, ||spoilers|| and multiple lines.` - - `[p]set bot custominfo Join my [support server](discord.gg/discord)!` - - `[p]set bot custominfo` - Removes custom info text. + - `[p]set bot custominfo >>> I can use **markdown** such as quotes, ||spoilers|| and multiple lines.` + - `[p]set bot custominfo Join my [support server](discord.gg/discord)!` + - `[p]set bot custominfo` - Removes custom info text. **Arguments:** - - `[text]` - The custom info text. + - `[text]` - The custom info text. """ if not text: await ctx.bot._config.custom_info.clear() @@ -3038,13 +3039,13 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Leaving both streamer and stream_title empty will clear it. **Examples:** - - `[p]set status stream` - Clears the activity status. - - `[p]set status stream 26 Twentysix is streaming` - Sets the stream to `https://www.twitch.tv/26`. - - `[p]set status stream https://twitch.tv/26 Twentysix is streaming` - Sets the URL manually. + - `[p]set status stream` - Clears the activity status. + - `[p]set status stream 26 Twentysix is streaming` - Sets the stream to `https://www.twitch.tv/26`. + - `[p]set status stream https://twitch.tv/26 Twentysix is streaming` - Sets the URL manually. **Arguments:** - - `` - The twitch streamer to provide a link to. This can be their twitch name or the entire URL. - - `` - The text to follow `Streaming` in the status.""" + - `` - The twitch streamer to provide a link to. This can be their twitch name or the entire URL. + - `` - The text to follow `Streaming` in the status.""" status = ctx.bot.guilds[0].me.status if len(ctx.bot.guilds) > 0 else None if stream_title: @@ -3077,11 +3078,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Maximum length for a playing status is 128 characters. **Examples:** - - `[p]set status playing` - Clears the activity status. - - `[p]set status playing the keyboard` + - `[p]set status playing` - Clears the activity status. + - `[p]set status playing the keyboard` **Arguments:** - - `[game]` - The text to follow `Playing`. Leave blank to clear the current activity status. + - `[game]` - The text to follow `Playing`. Leave blank to clear the current activity status. """ if game: @@ -3109,11 +3110,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Maximum length for a listening status is 128 characters. **Examples:** - - `[p]set status listening` - Clears the activity status. - - `[p]set status listening jams` + - `[p]set status listening` - Clears the activity status. + - `[p]set status listening jams` **Arguments:** - - `[listening]` - The text to follow `Listening to`. Leave blank to clear the current activity status. + - `[listening]` - The text to follow `Listening to`. Leave blank to clear the current activity status. """ status = ctx.bot.guilds[0].me.status if len(ctx.bot.guilds) > 0 else discord.Status.online @@ -3145,11 +3146,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Maximum length for a watching status is 128 characters. **Examples:** - - `[p]set status watching` - Clears the activity status. - - `[p]set status watching [p]help` + - `[p]set status watching` - Clears the activity status. + - `[p]set status watching [p]help` **Arguments:** - - `[watching]` - The text to follow `Watching`. Leave blank to clear the current activity status. + - `[watching]` - The text to follow `Watching`. Leave blank to clear the current activity status. """ status = ctx.bot.guilds[0].me.status if len(ctx.bot.guilds) > 0 else discord.Status.online @@ -3177,11 +3178,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Maximum length for a competing status is 128 characters. **Examples:** - - `[p]set status competing` - Clears the activity status. - - `[p]set status competing London 2012 Olympic Games` + - `[p]set status competing` - Clears the activity status. + - `[p]set status competing London 2012 Olympic Games` **Arguments:** - - `[competing]` - The text to follow `Competing in`. Leave blank to clear the current activity status. + - `[competing]` - The text to follow `Competing in`. Leave blank to clear the current activity status. """ status = ctx.bot.guilds[0].me.status if len(ctx.bot.guilds) > 0 else discord.Status.online @@ -3260,11 +3261,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): And more. **Examples:** - - `[p]set roles addadminrole @Admins` - - `[p]set roles addadminrole Super Admins` + - `[p]set roles addadminrole @Admins` + - `[p]set roles addadminrole Super Admins` **Arguments:** - - `` - The role to add as an admin. + - `` - The role to add as an admin. """ async with ctx.bot._config.guild(ctx.guild).admin_role() as roles: if role.id in roles: @@ -3287,11 +3288,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): And more. **Examples:** - - `[p]set roles addmodrole @Mods` - - `[p]set roles addmodrole Loyal Helpers` + - `[p]set roles addmodrole @Mods` + - `[p]set roles addmodrole Loyal Helpers` **Arguments:** - - `` - The role to add as a moderator. + - `` - The role to add as a moderator. """ async with ctx.bot._config.guild(ctx.guild).mod_role() as roles: if role.id in roles: @@ -3309,11 +3310,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Removes an admin role for this server. **Examples:** - - `[p]set roles removeadminrole @Admins` - - `[p]set roles removeadminrole Super Admins` + - `[p]set roles removeadminrole @Admins` + - `[p]set roles removeadminrole Super Admins` **Arguments:** - - `` - The role to remove from being an admin. + - `` - The role to remove from being an admin. """ async with ctx.bot._config.guild(ctx.guild).admin_role() as roles: if role.id not in roles: @@ -3331,11 +3332,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Removes a mod role for this server. **Examples:** - - `[p]set roles removemodrole @Mods` - - `[p]set roles removemodrole Loyal Helpers` + - `[p]set roles removemodrole @Mods` + - `[p]set roles removemodrole Loyal Helpers` **Arguments:** - - `` - The role to remove from being a moderator. + - `` - The role to remove from being a moderator. """ async with ctx.bot._config.guild(ctx.guild).mod_role() as roles: if role.id not in roles: @@ -3359,14 +3360,14 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): If you want to change bot's global locale, see `[p]set locale global` command. **Examples:** - - `[p]set locale en-US` - - `[p]set locale de-DE` - - `[p]set locale fr-FR` - - `[p]set locale pl-PL` - - `[p]set locale default` - Resets to the global default locale. + - `[p]set locale en-US` + - `[p]set locale de-DE` + - `[p]set locale fr-FR` + - `[p]set locale pl-PL` + - `[p]set locale default` - Resets to the global default locale. **Arguments:** - - `` - The default locale to use for the bot. This can be any language code with country code included. + - `` - The default locale to use for the bot. This can be any language code with country code included. """ if ctx.guild is None: await ctx.send_help() @@ -3386,13 +3387,13 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): To reset to English, use "en-US". **Examples:** - - `[p]set locale global en-US` - - `[p]set locale global de-DE` - - `[p]set locale global fr-FR` - - `[p]set locale global pl-PL` + - `[p]set locale global en-US` + - `[p]set locale global de-DE` + - `[p]set locale global fr-FR` + - `[p]set locale global pl-PL` **Arguments:** - - `` - The default locale to use for the bot. This can be any language code with country code included. + - `` - The default locale to use for the bot. This can be any language code with country code included. """ try: locale = BabelLocale.parse(language_code, sep="-") @@ -3422,14 +3423,14 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Use "default" to return to the bot's default set language. **Examples:** - - `[p]set locale server en-US` - - `[p]set locale server de-DE` - - `[p]set locale server fr-FR` - - `[p]set locale server pl-PL` - - `[p]set locale server default` - Resets to the global default locale. + - `[p]set locale server en-US` + - `[p]set locale server de-DE` + - `[p]set locale server fr-FR` + - `[p]set locale server pl-PL` + - `[p]set locale server default` - Resets to the global default locale. **Arguments:** - - `` - The default locale to use for the bot. This can be any language code with country code included. + - `` - The default locale to use for the bot. This can be any language code with country code included. """ if language_code.lower() == "default": global_locale = await self.bot._config.locale() @@ -3464,12 +3465,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): If you want to change bot's global regional format, see `[p]set regionalformat global` command. **Examples:** - - `[p]set regionalformat en-US` - - `[p]set region de-DE` - - `[p]set regionalformat reset` - Resets to the locale. + - `[p]set regionalformat en-US` + - `[p]set region de-DE` + - `[p]set regionalformat reset` - Resets to the locale. **Arguments:** - - `[language_code]` - The region format to use for the bot in this server. + - `[language_code]` - The region format to use for the bot in this server. """ if ctx.guild is None: await ctx.send_help() @@ -3486,12 +3487,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Pass "reset" to `language_code` to base regional formatting on bot's locale. **Examples:** - - `[p]set regionalformat global en-US` - - `[p]set region global de-DE` - - `[p]set regionalformat global reset` - Resets to the locale. + - `[p]set regionalformat global en-US` + - `[p]set region global de-DE` + - `[p]set regionalformat global reset` - Resets to the locale. **Arguments:** - - `[language_code]` - The default region format to use for the bot. + - `[language_code]` - The default region format to use for the bot. """ if language_code.lower() == "reset": i18n.set_regional_format(None) @@ -3529,12 +3530,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Pass "reset" to `language_code` to base regional formatting on bot's locale in this server. **Examples:** - - `[p]set regionalformat server en-US` - - `[p]set region local de-DE` - - `[p]set regionalformat server reset` - Resets to the locale. + - `[p]set regionalformat server en-US` + - `[p]set region local de-DE` + - `[p]set regionalformat server reset` - Resets to the locale. **Arguments:** - - `[language_code]` - The region format to use for the bot in this server. + - `[language_code]` - The region format to use for the bot in this server. """ if language_code.lower() == "reset": i18n.set_contextual_regional_format(None) @@ -3588,14 +3589,14 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Note: API tokens are sensitive, so this command should only be used in a private channel or in DM with the bot. **Examples:** - - `[p]set api` - - `[p]set api spotify` - - `[p]set api spotify redirect_uri localhost` - - `[p]set api github client_id,whoops client_secret,whoops` + - `[p]set api` + - `[p]set api spotify` + - `[p]set api spotify redirect_uri localhost` + - `[p]set api github client_id,whoops client_secret,whoops` **Arguments:** - - `` - The service you're adding tokens to. - - `` - Pairs of token keys and values. The key and value should be separated by one of ` `, `,`, or `;`. + - `` - The service you're adding tokens to. + - `` - Pairs of token keys and values. The key and value should be separated by one of ` `, `,`, or `;`. """ if service is None: # Handled in order of missing operations await ctx.send(_("Click the button below to set your keys."), view=SetApiView()) @@ -3618,7 +3619,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Secrets are not shown. **Example:** - - `[p]set api list` + - `[p]set api list` """ services: dict = await ctx.bot.get_shared_api_tokens() @@ -3642,11 +3643,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Remove the given services with all their keys and tokens. **Examples:** - - `[p]set api remove spotify` - - `[p]set api remove github youtube` + - `[p]set api remove spotify` + - `[p]set api remove github youtube` **Arguments:** - - `` - The services to remove.""" + - `` - The services to remove.""" bot_services = (await ctx.bot.get_shared_api_tokens()).keys() services = [s for s in services if s in bot_services] @@ -3688,7 +3689,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Additional owners and destinations will not be affected. **Example:** - - `[p]set ownernotifications optin` + - `[p]set ownernotifications optin` """ async with ctx.bot._config.owner_opt_out_list() as opt_outs: if ctx.author.id in opt_outs: @@ -3705,7 +3706,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Additional owners and destinations will still receive notifications. **Example:** - - `[p]set ownernotifications optout` + - `[p]set ownernotifications optout` """ async with ctx.bot._config.owner_opt_out_list() as opt_outs: if ctx.author.id not in opt_outs: @@ -3724,11 +3725,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Adds a destination text channel to receive owner notifications. **Examples:** - - `[p]set ownernotifications adddestination #owner-notifications` - - `[p]set ownernotifications adddestination 168091848718417920` - Accepts channel IDs. + - `[p]set ownernotifications adddestination #owner-notifications` + - `[p]set ownernotifications adddestination 168091848718417920` - Accepts channel IDs. **Arguments:** - - `` - The channel to send owner notifications to. + - `` - The channel to send owner notifications to. """ async with ctx.bot._config.extra_owner_destinations() as extras: if channel.id not in extras: @@ -3749,11 +3750,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Removes a destination text channel from receiving owner notifications. **Examples:** - - `[p]set ownernotifications removedestination #owner-notifications` - - `[p]set ownernotifications deletedestination 168091848718417920` - Accepts channel IDs. + - `[p]set ownernotifications removedestination #owner-notifications` + - `[p]set ownernotifications deletedestination 168091848718417920` - Accepts channel IDs. **Arguments:** - - `` - The channel to stop sending owner notifications to. + - `` - The channel to stop sending owner notifications to. """ try: @@ -3773,7 +3774,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Lists the configured extra destinations for owner notifications. **Example:** - - `[p]set ownernotifications listdestinations` + - `[p]set ownernotifications listdestinations` """ channel_ids = await ctx.bot._config.extra_owner_destinations() @@ -3877,12 +3878,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): This is only applied to the current server and not globally. **Examples:** - - `[p]set deletedelay` - Shows the current delete delay setting. - - `[p]set deletedelay 60` - Sets the delete delay to the max of 60 seconds. - - `[p]set deletedelay -1` - Disables deleting command messages. + - `[p]set deletedelay` - Shows the current delete delay setting. + - `[p]set deletedelay 60` - Sets the delete delay to the max of 60 seconds. + - `[p]set deletedelay -1` - Disables deleting command messages. **Arguments:** - - `[time]` - The seconds to wait before deleting the command message. Use -1 to disable. + - `[time]` - The seconds to wait before deleting the command message. Use -1 to disable. """ guild = ctx.guild if time is not None: @@ -3916,7 +3917,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Otherwise, the colour used will be the colour of the bot's top role. **Example:** - - `[p]set usebotcolour` + - `[p]set usebotcolour` """ current_setting = await ctx.bot._config.guild(ctx.guild).use_bot_color() await ctx.bot._config.guild(ctx.guild).use_bot_color.set(not current_setting) @@ -3940,7 +3941,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Default is for fuzzy command search to be disabled. **Example:** - - `[p]set serverfuzzy` + - `[p]set serverfuzzy` """ current_setting = await ctx.bot._config.guild(ctx.guild).fuzzy() await ctx.bot._config.guild(ctx.guild).fuzzy.set(not current_setting) @@ -3961,7 +3962,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Default is for fuzzy command search to be disabled. **Example:** - - `[p]set fuzzy` + - `[p]set fuzzy` """ current_setting = await ctx.bot._config.fuzzy() await ctx.bot._config.fuzzy.set(not current_setting) @@ -3982,14 +3983,14 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.ColourConverter **Examples:** - - `[p]set colour dark red` - - `[p]set colour blurple` - - `[p]set colour 0x5DADE2` - - `[p]set color 0x#FDFEFE` - - `[p]set color #7F8C8D` + - `[p]set colour dark red` + - `[p]set colour blurple` + - `[p]set colour 0x5DADE2` + - `[p]set color 0x#FDFEFE` + - `[p]set color #7F8C8D` **Arguments:** - - `[colour]` - The colour to use for embeds. Leave blank to set to the default value (red). + - `[colour]` - The colour to use for embeds. Leave blank to set to the default value (red). """ if colour is None: ctx.bot._color = discord.Color.red() @@ -4013,13 +4014,13 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): See also the `--mentionable` flag to enable mentioning the bot as the prefix. **Examples:** - - `[p]set prefix !` - - `[p]set prefix "! "` - Quotes are needed to use spaces in prefixes. - - `[p]set prefix "@[botname] "` - This uses a mention as the prefix. See also the `--mentionable` flag. - - `[p]set prefix ! ? .` - Sets multiple prefixes. + - `[p]set prefix !` + - `[p]set prefix "! "` - Quotes are needed to use spaces in prefixes. + - `[p]set prefix "@[botname] "` - This uses a mention as the prefix. See also the `--mentionable` flag. + - `[p]set prefix ! ? .` - Sets multiple prefixes. **Arguments:** - - `` - The prefixes the bot will respond to globally. + - `` - The prefixes the bot will respond to globally. """ if any(prefix.startswith("/") for prefix in prefixes): await ctx.send( @@ -4063,15 +4064,15 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): A prefix cannot have more than 25 characters. **Examples:** - - `[p]set serverprefix !` - - `[p]set serverprefix "! "` - Quotes are needed to use spaces in prefixes. - - `[p]set serverprefix "@[botname] "` - This uses a mention as the prefix. - - `[p]set serverprefix ! ? .` - Sets multiple prefixes. - - `[p]set serverprefix "Red - Discord Bot" ?` - Sets the prefix for a specific server. Quotes are needed to use spaces in the server name. + - `[p]set serverprefix !` + - `[p]set serverprefix "! "` - Quotes are needed to use spaces in prefixes. + - `[p]set serverprefix "@[botname] "` - This uses a mention as the prefix. + - `[p]set serverprefix ! ? .` - Sets multiple prefixes. + - `[p]set serverprefix "Red - Discord Bot" ?` - Sets the prefix for a specific server. Quotes are needed to use spaces in the server name. **Arguments:** - - `[server]` - The server to set the prefix for. Defaults to current server. - - `[prefixes...]` - The prefixes the bot will respond to on this server. Leave blank to clear server prefixes. + - `[server]` - The server to set the prefix for. Defaults to current server. + - `[prefixes...]` - The prefixes the bot will respond to on this server. Leave blank to clear server prefixes. """ if server is None: server = ctx.guild @@ -4168,7 +4169,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Warning: These settings may not be accurate if the default formatter is not in use. **Example:** - - `[p]helpset showsettings` + - `[p]helpset showsettings` """ help_settings = await commands.help.HelpSettings.from_context(ctx) @@ -4190,7 +4191,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): This resets [botname]'s help formatter to the default formatter. **Example:** - - `[p]helpset resetformatter` + - `[p]helpset resetformatter` """ ctx.bot.reset_help_formatter() @@ -4210,7 +4211,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): This may not have an impact when using custom formatters from 3rd party cogs **Example:** - - `[p]helpset resetsettings` + - `[p]helpset resetsettings` """ await ctx.bot._config.help.clear() await ctx.send( @@ -4235,11 +4236,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): and will use the associated control scheme to navigate between pages. **Examples:** - - `[p]helpset usemenus reactions` - Enables using reaction menus. - - `[p]helpset usemenus buttons` - Enables using button menus. - - `[p]helpset usemenus select` - Enables buttons with a select menu. - - `[p]helpset usemenus selectonly` - Enables a select menu only on help. - - `[p]helpset usemenus disable` - Disables help menus. + - `[p]helpset usemenus reactions` - Enables using reaction menus. + - `[p]helpset usemenus buttons` - Enables using button menus. + - `[p]helpset usemenus select` - Enables buttons with a select menu. + - `[p]helpset usemenus selectonly` - Enables a select menu only on help. + - `[p]helpset usemenus disable` - Disables help menus. **Arguments:** - `<"buttons"|"reactions"|"select"|"selectonly"|"disable">` - Whether to use `buttons`, @@ -4272,11 +4273,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Using this without a setting will toggle. **Examples:** - - `[p]helpset showhidden True` - Enables showing hidden commands. - - `[p]helpset showhidden` - Toggles the value. + - `[p]helpset showhidden True` - Enables showing hidden commands. + - `[p]helpset showhidden` - Toggles the value. **Arguments:** - - `[show_hidden]` - Whether to use show hidden commands in help. Leave blank to toggle. + - `[show_hidden]` - Whether to use show hidden commands in help. Leave blank to toggle. """ if show_hidden is None: show_hidden = not await ctx.bot._config.help.show_hidden() @@ -4295,11 +4296,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Using this without a setting will toggle. **Examples:** - - `[p]helpset showaliases False` - Disables showing aliases on this server. - - `[p]helpset showaliases` - Toggles the value. + - `[p]helpset showaliases False` - Disables showing aliases on this server. + - `[p]helpset showaliases` - Toggles the value. **Arguments:** - - `[show_aliases]` - Whether to include aliases in help. Leave blank to toggle. + - `[show_aliases]` - Whether to include aliases in help. Leave blank to toggle. """ if show_aliases is None: show_aliases = not await ctx.bot._config.help.show_aliases() @@ -4322,11 +4323,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Note: This is only used when the bot is not using menus. **Examples:** - - `[p]helpset usetick False` - Disables ticking when help is sent to DMs. - - `[p]helpset usetick` - Toggles the value. + - `[p]helpset usetick False` - Disables ticking when help is sent to DMs. + - `[p]helpset usetick` - Toggles the value. **Arguments:** - - `[use_tick]` - Whether to tick the help command when help is sent to DMs. Leave blank to toggle. + - `[use_tick]` - Whether to tick the help command when help is sent to DMs. Leave blank to toggle. """ if use_tick is None: use_tick = not await ctx.bot._config.help.use_tick() @@ -4345,11 +4346,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Using this without a setting will toggle. **Examples:** - - `[p]helpset verifychecks False` - Enables showing unusable commands in help. - - `[p]helpset verifychecks` - Toggles the value. + - `[p]helpset verifychecks False` - Enables showing unusable commands in help. + - `[p]helpset verifychecks` - Toggles the value. **Arguments:** - - `[verify]` - Whether to hide unusable commands in help. Leave blank to toggle. + - `[verify]` - Whether to hide unusable commands in help. Leave blank to toggle. """ if verify is None: verify = not await ctx.bot._config.help.verify_checks() @@ -4372,11 +4373,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Using this without a setting will toggle. **Examples:** - - `[p]helpset verifyexists True` - Enables sending help for nonexistent topics. - - `[p]helpset verifyexists` - Toggles the value. + - `[p]helpset verifyexists True` - Enables sending help for nonexistent topics. + - `[p]helpset verifyexists` - Toggles the value. **Arguments:** - - `[verify]` - Whether to respond to help for nonexistent topics. Leave blank to toggle. + - `[verify]` - Whether to respond to help for nonexistent topics. Leave blank to toggle. """ if verify is None: verify = not await ctx.bot._config.help.verify_exists() @@ -4404,10 +4405,10 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): mean some pages will exceed this limit. **Example:** - - `[p]helpset pagecharlimit 1500` + - `[p]helpset pagecharlimit 1500` **Arguments:** - - `` - The max amount of characters to show per page in the help message. + - `` - The max amount of characters to show per page in the help message. """ if limit < 500: await ctx.send(_("You must give a value of at least 500 characters.")) @@ -4429,11 +4430,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): The default value is 2 pages. **Examples:** - - `[p]helpset maxpages 50` - Basically never send help to DMs. - - `[p]helpset maxpages 0` - Always send help to DMs. + - `[p]helpset maxpages 50` - Basically never send help to DMs. + - `[p]helpset maxpages 0` - Always send help to DMs. **Arguments:** - - `` - The max pages allowed to send per help in a server. + - `` - The max pages allowed to send per help in a server. """ if pages < 0: await ctx.send(_("You must give a value of zero or greater!")) @@ -4454,13 +4455,13 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): The bot has to have MANAGE_MESSAGES permission for this to work. **Examples:** - - `[p]helpset deletedelay 60` - Delete the help pages after a minute. - - `[p]helpset deletedelay 1` - Delete the help pages as quickly as possible. - - `[p]helpset deletedelay 1209600` - Max time to wait before deleting (14 days). - - `[p]helpset deletedelay 0` - Disable deleting help pages. + - `[p]helpset deletedelay 60` - Delete the help pages after a minute. + - `[p]helpset deletedelay 1` - Delete the help pages as quickly as possible. + - `[p]helpset deletedelay 1209600` - Max time to wait before deleting (14 days). + - `[p]helpset deletedelay 0` - Disable deleting help pages. **Arguments:** - - `` - The seconds to wait before deleting help pages. + - `` - The seconds to wait before deleting help pages. """ if seconds < 0: await ctx.send(_("You must give a value of zero or greater!")) @@ -4483,13 +4484,13 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): The timeout has to be between 15 and 300 seconds. **Examples:** - - `[p]helpset reacttimeout 30` - The default timeout. - - `[p]helpset reacttimeout 60` - Timeout of 1 minute. - - `[p]helpset reacttimeout 15` - Minimum allowed timeout. - - `[p]helpset reacttimeout 300` - Max allowed timeout (5 mins). + - `[p]helpset reacttimeout 30` - The default timeout. + - `[p]helpset reacttimeout 60` - Timeout of 1 minute. + - `[p]helpset reacttimeout 15` - Minimum allowed timeout. + - `[p]helpset reacttimeout 300` - Max allowed timeout (5 mins). **Arguments:** - - `` - The timeout, in seconds, of the reactions. + - `` - The timeout, in seconds, of the reactions. """ if seconds < 15: await ctx.send(_("You must give a value of at least 15 seconds!")) @@ -4510,11 +4511,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): This setting only applies to embedded help. If no tagline is specified, the default will be used instead. **Examples:** - - `[p]helpset tagline Thanks for using the bot!` - - `[p]helpset tagline` - Resets the tagline to the default. + - `[p]helpset tagline Thanks for using the bot!` + - `[p]helpset tagline` - Resets the tagline to the default. **Arguments:** - - `[tagline]` - The tagline to appear at the bottom of help embeds. Leave blank to reset. + - `[tagline]` - The tagline to appear at the bottom of help embeds. Leave blank to reset. """ if tagline is None: await ctx.bot._config.help.tagline.set("") @@ -4540,10 +4541,10 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): This is limited to one message every 60 seconds per person. **Example:** - - `[p]contact Help! The bot has become sentient!` + - `[p]contact Help! The bot has become sentient!` **Arguments:** - - `[message]` - The message to send to the owner. + - `[message]` - The message to send to the owner. """ guild = ctx.message.guild author = ctx.message.author @@ -4626,10 +4627,10 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Enable 'Developer Mode', then right click a user and click on 'Copy ID'. **Example:** - - `[p]dm 262626262626262626 Do you like me? Yes / No` + - `[p]dm 262626262626262626 Do you like me? Yes / No` **Arguments:** - - `[message]` - The message to dm to the user. + - `[message]` - The message to dm to the user. """ destination = self.bot.get_user(user_id) if destination is None or destination.bot: @@ -4714,12 +4715,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): you can do so by using the command in DMs. **Example:** - - `[p]diagnoseissues #general @Slime ban` - Diagnose why @Slime can't use `[p]ban` in #general channel. + - `[p]diagnoseissues #general @Slime ban` - Diagnose why @Slime can't use `[p]ban` in #general channel. **Arguments:** - - `[channel]` - The text channel that the command should be tested for. Defaults to the current channel. - - `` - The member that should be considered as the command caller. - - `` - The name of the command to test. + - `[channel]` - The text channel that the command should be tested for. Defaults to the current channel. + - `` - The member that should be considered as the command caller. + - `` - The name of the command to test. """ if ctx.guild is None: await ctx.send( @@ -4773,11 +4774,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Adds users to the allowlist. **Examples:** - - `[p]allowlist add @26 @Will` - Adds two users to the allowlist. - - `[p]allowlist add 262626262626262626` - Adds a user by ID. + - `[p]allowlist add @26 @Will` - Adds two users to the allowlist. + - `[p]allowlist add 262626262626262626` - Adds a user by ID. **Arguments:** - - `` - The user or users to add to the allowlist. + - `` - The user or users to add to the allowlist. """ await self.bot.add_to_whitelist(users) if len(users) > 1: @@ -4791,7 +4792,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Lists users on the allowlist. **Example:** - - `[p]allowlist list` + - `[p]allowlist list` """ curr_list = await ctx.bot._config.whitelist() @@ -4819,11 +4820,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): The allowlist will be disabled if all users are removed. **Examples:** - - `[p]allowlist remove @26 @Will` - Removes two users from the allowlist. - - `[p]allowlist remove 262626262626262626` - Removes a user by ID. + - `[p]allowlist remove @26 @Will` - Removes two users from the allowlist. + - `[p]allowlist remove 262626262626262626` - Removes a user by ID. **Arguments:** - - `` - The user or users to remove from the allowlist. + - `` - The user or users to remove from the allowlist. """ await self.bot.remove_from_whitelist(users) if len(users) > 1: @@ -4839,7 +4840,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): This disables the allowlist. **Example:** - - `[p]allowlist clear` + - `[p]allowlist clear` """ await self.bot.clear_whitelist() await ctx.send(_("Allowlist has been cleared.")) @@ -4860,11 +4861,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Adds users to the blocklist. **Examples:** - - `[p]blocklist add @26 @Will` - Adds two users to the blocklist. - - `[p]blocklist add 262626262626262626` - Blocks a user by ID. + - `[p]blocklist add @26 @Will` - Adds two users to the blocklist. + - `[p]blocklist add 262626262626262626` - Blocks a user by ID. **Arguments:** - - `` - The user or users to add to the blocklist. + - `` - The user or users to add to the blocklist. """ for user in users: if isinstance(user, int): @@ -4887,7 +4888,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Lists users on the blocklist. **Example:** - - `[p]blocklist list` + - `[p]blocklist list` """ curr_list = await self.bot.get_blacklist() @@ -4913,11 +4914,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Removes users from the blocklist. **Examples:** - - `[p]blocklist remove @26 @Will` - Removes two users from the blocklist. - - `[p]blocklist remove 262626262626262626` - Removes a user by ID. + - `[p]blocklist remove @26 @Will` - Removes two users from the blocklist. + - `[p]blocklist remove 262626262626262626` - Removes a user by ID. **Arguments:** - - `` - The user or users to remove from the blocklist. + - `` - The user or users to remove from the blocklist. """ await self.bot.remove_from_blacklist(users) if len(users) > 1: @@ -4931,7 +4932,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Clears the blocklist. **Example:** - - `[p]blocklist clear` + - `[p]blocklist clear` """ await self.bot.clear_blacklist() await ctx.send(_("Blocklist has been cleared.")) @@ -4957,12 +4958,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Adds a user or role to the server allowlist. **Examples:** - - `[p]localallowlist add @26 @Will` - Adds two users to the local allowlist. - - `[p]localallowlist add 262626262626262626` - Allows a user by ID. - - `[p]localallowlist add "Super Admins"` - Allows a role with a space in the name without mentioning. + - `[p]localallowlist add @26 @Will` - Adds two users to the local allowlist. + - `[p]localallowlist add 262626262626262626` - Allows a user by ID. + - `[p]localallowlist add "Super Admins"` - Allows a role with a space in the name without mentioning. **Arguments:** - - `` - The users or roles to remove from the local allowlist. + - `` - The users or roles to remove from the local allowlist. """ names = [getattr(u_or_r, "name", u_or_r) for u_or_r in users_or_roles] uids = {getattr(u_or_r, "id", u_or_r) for u_or_r in users_or_roles} @@ -4991,7 +4992,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Lists users and roles on the server allowlist. **Example:** - - `[p]localallowlist list` + - `[p]localallowlist list` """ curr_list = await self.bot.get_whitelist(ctx.guild) @@ -5021,12 +5022,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): The local allowlist will be disabled if all users are removed. **Examples:** - - `[p]localallowlist remove @26 @Will` - Removes two users from the local allowlist. - - `[p]localallowlist remove 262626262626262626` - Removes a user by ID. - - `[p]localallowlist remove "Super Admins"` - Removes a role with a space in the name without mentioning. + - `[p]localallowlist remove @26 @Will` - Removes two users from the local allowlist. + - `[p]localallowlist remove 262626262626262626` - Removes a user by ID. + - `[p]localallowlist remove "Super Admins"` - Removes a role with a space in the name without mentioning. **Arguments:** - - `` - The users or roles to remove from the local allowlist. + - `` - The users or roles to remove from the local allowlist. """ names = [getattr(u_or_r, "name", u_or_r) for u_or_r in users_or_roles] uids = {getattr(u_or_r, "id", u_or_r) for u_or_r in users_or_roles} @@ -5056,7 +5057,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): This disables the local allowlist and clears all entries. **Example:** - - `[p]localallowlist clear` + - `[p]localallowlist clear` """ await self.bot.clear_whitelist(ctx.guild) await ctx.send(_("Server allowlist has been cleared.")) @@ -5080,12 +5081,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Adds a user or role to the local blocklist. **Examples:** - - `[p]localblocklist add @26 @Will` - Adds two users to the local blocklist. - - `[p]localblocklist add 262626262626262626` - Blocks a user by ID. - - `[p]localblocklist add "Bad Apples"` - Blocks a role with a space in the name without mentioning. + - `[p]localblocklist add @26 @Will` - Adds two users to the local blocklist. + - `[p]localblocklist add 262626262626262626` - Blocks a user by ID. + - `[p]localblocklist add "Bad Apples"` - Blocks a role with a space in the name without mentioning. **Arguments:** - - `` - The users or roles to add to the local blocklist. + - `` - The users or roles to add to the local blocklist. """ for user_or_role in users_or_roles: uid = discord.Object(id=getattr(user_or_role, "id", user_or_role)) @@ -5111,7 +5112,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Lists users and roles on the server blocklist. **Example:** - - `[p]localblocklist list` + - `[p]localblocklist list` """ curr_list = await self.bot.get_blacklist(ctx.guild) @@ -5139,12 +5140,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Removes user or role from local blocklist. **Examples:** - - `[p]localblocklist remove @26 @Will` - Removes two users from the local blocklist. - - `[p]localblocklist remove 262626262626262626` - Unblocks a user by ID. - - `[p]localblocklist remove "Bad Apples"` - Unblocks a role with a space in the name without mentioning. + - `[p]localblocklist remove @26 @Will` - Removes two users from the local blocklist. + - `[p]localblocklist remove 262626262626262626` - Unblocks a user by ID. + - `[p]localblocklist remove "Bad Apples"` - Unblocks a role with a space in the name without mentioning. **Arguments:** - - `` - The users or roles to remove from the local blocklist. + - `` - The users or roles to remove from the local blocklist. """ await self.bot.remove_from_blacklist(users_or_roles, guild=ctx.guild) @@ -5161,7 +5162,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): This disables the server blocklist and clears all entries. **Example:** - - `[p]blocklist clear` + - `[p]blocklist clear` """ await self.bot.clear_blacklist(ctx.guild) await ctx.send(_("Server blocklist has been cleared.")) @@ -5183,11 +5184,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Note: This will only work on loaded cogs, and must reference the title-case cog name. **Examples:** - - `[p]command defaultdisablecog Economy` - - `[p]command defaultdisablecog ModLog` + - `[p]command defaultdisablecog Economy` + - `[p]command defaultdisablecog ModLog` **Arguments:** - - `` - The name of the cog to make disabled by default. Must be title-case. + - `` - The name of the cog to make disabled by default. Must be title-case. """ cogname = cog.qualified_name if isinstance(cog, commands.commands._RuleDropper): @@ -5206,11 +5207,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Note: This will only work on loaded cogs, and must reference the title-case cog name. **Examples:** - - `[p]command defaultenablecog Economy` - - `[p]command defaultenablecog ModLog` + - `[p]command defaultenablecog Economy` + - `[p]command defaultenablecog ModLog` **Arguments:** - - `` - The name of the cog to make enabled by default. Must be title-case. + - `` - The name of the cog to make enabled by default. Must be title-case. """ cogname = cog.qualified_name await self.bot._disabled_cog_cache.default_enable(cogname) @@ -5224,11 +5225,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Note: This will only work on loaded cogs, and must reference the title-case cog name. **Examples:** - - `[p]command disablecog Economy` - - `[p]command disablecog ModLog` + - `[p]command disablecog Economy` + - `[p]command disablecog ModLog` **Arguments:** - - `` - The name of the cog to disable on this server. Must be title-case. + - `` - The name of the cog to disable on this server. Must be title-case. """ cogname = cog.qualified_name if isinstance(cog, commands.commands._RuleDropper): @@ -5248,11 +5249,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Note: This will only work on loaded cogs, and must reference the title-case cog name. **Examples:** - - `[p]command enablecog Economy` - - `[p]command enablecog ModLog` + - `[p]command enablecog Economy` + - `[p]command enablecog ModLog` **Arguments:** - - `` - The name of the cog to enable on this server. Must be title-case. + - `` - The name of the cog to enable on this server. Must be title-case. """ if await self.bot._disabled_cog_cache.enable_cog_in_guild(cogname, ctx.guild.id): await ctx.send(_("{cogname} has been enabled in this guild.").format(cogname=cogname)) @@ -5272,7 +5273,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): """List the cogs which are disabled in this server. **Example:** - - `[p]command listdisabledcogs` + - `[p]command listdisabledcogs` """ disabled = [ cog.qualified_name @@ -5299,7 +5300,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Otherwise, this will show disabled commands on the current server. **Example:** - - `[p]command listdisabled` + - `[p]command listdisabled` """ # Select the scope based on the author's privileges if await ctx.bot.is_owner(ctx.author): @@ -5312,7 +5313,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): """List disabled commands globally. **Example:** - - `[p]command listdisabled global` + - `[p]command listdisabled global` """ disabled_list = await self.bot._config.disabled_commands() if not disabled_list: @@ -5334,7 +5335,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): """List disabled commands in this server. **Example:** - - `[p]command listdisabled guild` + - `[p]command listdisabled guild` """ disabled_list = await self.bot._config.guild(ctx.guild).disabled_commands() if not disabled_list: @@ -5359,11 +5360,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Otherwise, this will disable commands on the current server. **Examples:** - - `[p]command disable userinfo` - Disables the `userinfo` command in the Mod cog. - - `[p]command disable urban` - Disables the `urban` command in the General cog. + - `[p]command disable userinfo` - Disables the `userinfo` command in the Mod cog. + - `[p]command disable urban` - Disables the `urban` command in the General cog. **Arguments:** - - `` - The command to disable. + - `` - The command to disable. """ # Select the scope based on the author's privileges if await ctx.bot.is_owner(ctx.author): @@ -5378,11 +5379,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Disable a command globally. **Examples:** - - `[p]command disable global userinfo` - Disables the `userinfo` command in the Mod cog. - - `[p]command disable global urban` - Disables the `urban` command in the General cog. + - `[p]command disable global userinfo` - Disables the `userinfo` command in the Mod cog. + - `[p]command disable global urban` - Disables the `urban` command in the General cog. **Arguments:** - - `` - The command to disable globally. + - `` - The command to disable globally. """ if self.command_manager in command.parents or self.command_manager == command: await ctx.send( @@ -5414,11 +5415,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Disable a command in this server only. **Examples:** - - `[p]command disable server userinfo` - Disables the `userinfo` command in the Mod cog. - - `[p]command disable server urban` - Disables the `urban` command in the General cog. + - `[p]command disable server userinfo` - Disables the `userinfo` command in the Mod cog. + - `[p]command disable server urban` - Disables the `urban` command in the General cog. **Arguments:** - - `` - The command to disable for the current server. + - `` - The command to disable for the current server. """ if self.command_manager in command.parents or self.command_manager == command: await ctx.send( @@ -5456,11 +5457,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Otherwise, this will try to enable a command disabled on the current server. **Examples:** - - `[p]command enable userinfo` - Enables the `userinfo` command in the Mod cog. - - `[p]command enable urban` - Enables the `urban` command in the General cog. + - `[p]command enable userinfo` - Enables the `userinfo` command in the Mod cog. + - `[p]command enable urban` - Enables the `urban` command in the General cog. **Arguments:** - - `` - The command to enable. + - `` - The command to enable. """ if await ctx.bot.is_owner(ctx.author): await ctx.invoke(self.command_enable_global, command=command) @@ -5474,11 +5475,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Enable a command globally. **Examples:** - - `[p]command enable global userinfo` - Enables the `userinfo` command in the Mod cog. - - `[p]command enable global urban` - Enables the `urban` command in the General cog. + - `[p]command enable global userinfo` - Enables the `userinfo` command in the Mod cog. + - `[p]command enable global urban` - Enables the `urban` command in the General cog. **Arguments:** - - `` - The command to enable globally. + - `` - The command to enable globally. """ async with ctx.bot._config.disabled_commands() as disabled_commands: with contextlib.suppress(ValueError): @@ -5498,11 +5499,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Enable a command in this server. **Examples:** - - `[p]command enable server userinfo` - Enables the `userinfo` command in the Mod cog. - - `[p]command enable server urban` - Enables the `urban` command in the General cog. + - `[p]command enable server userinfo` - Enables the `userinfo` command in the Mod cog. + - `[p]command enable server urban` - Enables the `urban` command in the General cog. **Arguments:** - - `` - The command to enable for the current server. + - `` - The command to enable for the current server. """ if command.requires.privilege_level is not None: if command.requires.privilege_level > await PrivilegeLevel.from_ctx(ctx): @@ -5530,12 +5531,12 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): To include the command name in the message, include the `{command}` placeholder. **Examples:** - - `[p]command disabledmsg This command is disabled` - - `[p]command disabledmsg {command} is disabled` - - `[p]command disabledmsg` - Sends nothing when a disabled command is attempted. + - `[p]command disabledmsg This command is disabled` + - `[p]command disabledmsg {command} is disabled` + - `[p]command disabledmsg` - Sends nothing when a disabled command is attempted. **Arguments:** - - `[message]` - The message to send when a disabled command is attempted. + - `[message]` - The message to send when a disabled command is attempted. """ await ctx.bot._config.disabled_command_msg.set(message) await ctx.tick() @@ -5557,7 +5558,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Gets the current members and roles configured for automatic moderation action immunity. **Example:** - - `[p]autoimmune list` + - `[p]autoimmune list` """ ai_ids = await ctx.bot._config.guild(ctx.guild).autoimmune_ids() @@ -5588,11 +5589,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Makes a user or role immune from automated moderation actions. **Examples:** - - `[p]autoimmune add @Twentysix` - Adds a user. - - `[p]autoimmune add @Mods` - Adds a role. + - `[p]autoimmune add @Twentysix` - Adds a user. + - `[p]autoimmune add @Mods` - Adds a role. **Arguments:** - - `` - The user or role to add immunity to. + - `` - The user or role to add immunity to. """ async with ctx.bot._config.guild(ctx.guild).autoimmune_ids() as ai_ids: if user_or_role.id in ai_ids: @@ -5608,11 +5609,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Remove a user or role from being immune to automated moderation actions. **Examples:** - - `[p]autoimmune remove @Twentysix` - Removes a user. - - `[p]autoimmune remove @Mods` - Removes a role. + - `[p]autoimmune remove @Twentysix` - Removes a user. + - `[p]autoimmune remove @Mods` - Removes a role. **Arguments:** - - `` - The user or role to remove immunity from. + - `` - The user or role to remove immunity from. """ async with ctx.bot._config.guild(ctx.guild).autoimmune_ids() as ai_ids: if user_or_role.id not in ai_ids: @@ -5628,11 +5629,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Checks if a user or role would be considered immune from automated actions. **Examples:** - - `[p]autoimmune isimmune @Twentysix` - - `[p]autoimmune isimmune @Mods` + - `[p]autoimmune isimmune @Twentysix` + - `[p]autoimmune isimmune @Mods` **Arguments:** - - `` - The user or role to check the immunity of. + - `` - The user or role to check the immunity of. """ if await ctx.bot.is_automod_immune(user_or_role): @@ -5679,7 +5680,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): List the currently ignored servers and channels. **Example:** - - `[p]ignore list` + - `[p]ignore list` """ for page in pagify(await self.count_ignored(ctx)): await ctx.maybe_send_embed(page) @@ -5705,13 +5706,13 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Note: Owners, Admins, and those with Manage Channel permissions override ignored channels. **Examples:** - - `[p]ignore channel #general` - Ignores commands in the #general channel. - - `[p]ignore channel` - Ignores commands in the current channel. - - `[p]ignore channel "General Channels"` - Use quotes for categories with spaces. - - `[p]ignore channel 356236713347252226` - Also accepts IDs. + - `[p]ignore channel #general` - Ignores commands in the #general channel. + - `[p]ignore channel` - Ignores commands in the current channel. + - `[p]ignore channel "General Channels"` - Use quotes for categories with spaces. + - `[p]ignore channel 356236713347252226` - Also accepts IDs. **Arguments:** - - `` - The channel to ignore. This can also be a thread or category channel. + - `` - The channel to ignore. This can also be a thread or category channel. """ if not await self.bot._ignored_cache.get_ignored_channel(channel): await self.bot._ignored_cache.set_ignored_channel(channel, True) @@ -5728,7 +5729,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Note: Owners, Admins, and those with Manage Server permissions override ignored servers. **Example:** - - `[p]ignore server` - Ignores the current server + - `[p]ignore server` - Ignores the current server """ guild = ctx.guild if not await self.bot._ignored_cache.get_ignored_guild(guild): @@ -5762,13 +5763,13 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Defaults to the current thread or channel. **Examples:** - - `[p]unignore channel #general` - Unignores commands in the #general channel. - - `[p]unignore channel` - Unignores commands in the current channel. - - `[p]unignore channel "General Channels"` - Use quotes for categories with spaces. - - `[p]unignore channel 356236713347252226` - Also accepts IDs. Use this method to unignore categories. + - `[p]unignore channel #general` - Unignores commands in the #general channel. + - `[p]unignore channel` - Unignores commands in the current channel. + - `[p]unignore channel "General Channels"` - Use quotes for categories with spaces. + - `[p]unignore channel 356236713347252226` - Also accepts IDs. Use this method to unignore categories. **Arguments:** - - `` - The channel to unignore. This can also be a thread or category channel. + - `` - The channel to unignore. This can also be a thread or category channel. """ if await self.bot._ignored_cache.get_ignored_channel(channel): await self.bot._ignored_cache.set_ignored_channel(channel, False) @@ -5783,7 +5784,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): Remove this server from the ignore list. **Example:** - - `[p]unignore server` - Stops ignoring the current server + - `[p]unignore server` - Stops ignoring the current server """ guild = ctx.message.guild if await self.bot._ignored_cache.get_ignored_guild(guild):