mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 18:06:08 -05:00
Grammar fixes (#4500)
* Grammar fixes * More changes * Grammar * Error grammar * Spelling * Grammar * REsolves grammar * grammar * grammar * grammar * grammar * grammar * grammar * grammar * grammar * "commited" > "committed" * apostrophe * more grammar * grammar * `funtion` to `function` * grammar in alias cog * grammar in cleanup cog * grammar in customcom cog * grammar in mod cog * grammar in reports cog * fix grammar in streams cog * missing apostrophe * grammar fix in trivia cog Co-authored-by: Jyu Viole Grace <24418520+thisisjvgrace@users.noreply.github.com> Co-authored-by: Jyu Viole Grace <thisisjvgrace@users.noreply.github.com>
This commit is contained in:
@@ -246,12 +246,12 @@ class RedBase(
|
||||
"and implement the required interfaces."
|
||||
)
|
||||
|
||||
# do not switch to isinstance, we want to know that this has not been overriden,
|
||||
# do not switch to isinstance, we want to know that this has not been overridden,
|
||||
# even with a subclass.
|
||||
if type(self._help_formatter) is commands.help.RedHelpFormatter:
|
||||
self._help_formatter = formatter
|
||||
else:
|
||||
raise RuntimeError("The formatter has already been overriden.")
|
||||
raise RuntimeError("The formatter has already been overridden.")
|
||||
|
||||
def reset_help_formatter(self):
|
||||
"""
|
||||
@@ -1217,7 +1217,7 @@ class RedBase(
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
This is a convienience wrapper around
|
||||
This is a convenience wrapper around
|
||||
|
||||
discord.abc.Messageable.send
|
||||
|
||||
@@ -1227,7 +1227,7 @@ class RedBase(
|
||||
|
||||
This should realistically only be used for responding using user provided
|
||||
input. (unfortunately, including usernames)
|
||||
Manually crafted messages which dont take any user input have no need of this
|
||||
Manually crafted messages which don't take any user input have no need of this
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
||||
@@ -45,7 +45,7 @@ _ = Translator("nah", __file__)
|
||||
|
||||
"""
|
||||
Anything here is either a reimplementation or re-export
|
||||
of a discord.py funtion or class with more lies for mypy
|
||||
of a discord.py function or class with more lies for mypy
|
||||
"""
|
||||
|
||||
__all__ = [
|
||||
|
||||
@@ -134,7 +134,7 @@ class CogCommandMixin:
|
||||
return ctx.clean_prefix
|
||||
if s == "[botname]":
|
||||
return ctx.me.display_name
|
||||
# We shouldnt get here:
|
||||
# We shouldn't get here:
|
||||
return s
|
||||
|
||||
return formatting_pattern.sub(replacement, text)
|
||||
@@ -268,7 +268,7 @@ class Command(CogCommandMixin, DPYCommand):
|
||||
|
||||
None of your methods should start with ``red_`` or
|
||||
be dunder names which start with red (eg. ``__red_test_thing__``)
|
||||
unless to override behavior in a method designed to be overriden,
|
||||
unless to override behavior in a method designed to be overridden,
|
||||
as this prefix is reserved for future methods in order to be
|
||||
able to add features non-breakingly.
|
||||
|
||||
@@ -655,7 +655,7 @@ class Command(CogCommandMixin, DPYCommand):
|
||||
@a_command.error
|
||||
async def a_command_error_handler(self, ctx, error):
|
||||
|
||||
if isinstance(error.original, MyErrrorType):
|
||||
if isinstance(error.original, MyErrorType):
|
||||
self.log_exception(error.original)
|
||||
else:
|
||||
await ctx.bot.on_command_error(ctx, error.original, unhandled_by_cog=True)
|
||||
@@ -815,7 +815,7 @@ class Group(GroupMixin, Command, CogGroupMixin, DPYGroup):
|
||||
return await ctx.send_help()
|
||||
elif self.invoke_without_command:
|
||||
# So invoke_without_command when a subcommand of this group is invoked
|
||||
# will skip the the invokation of *this* command. However, because of
|
||||
# will skip the invocation of *this* command. However, because of
|
||||
# how our permissions system works, we don't want it to skip the checks
|
||||
# as well.
|
||||
if not await self.can_run(ctx, change_permission_state=True):
|
||||
@@ -877,8 +877,8 @@ class CogMixin(CogGroupMixin, CogCommandMixin):
|
||||
Raises
|
||||
------
|
||||
RedUnhandledAPI
|
||||
If the method was not overriden,
|
||||
or an overriden implementation is not handling this
|
||||
If the method was not overridden,
|
||||
or an overridden implementation is not handling this
|
||||
|
||||
"""
|
||||
raise RedUnhandledAPI()
|
||||
@@ -960,8 +960,8 @@ class CogMixin(CogGroupMixin, CogCommandMixin):
|
||||
Raises
|
||||
------
|
||||
RedUnhandledAPI
|
||||
If the method was not overriden,
|
||||
or an overriden implementation is not handling this
|
||||
If the method was not overridden,
|
||||
or an overridden implementation is not handling this
|
||||
"""
|
||||
raise RedUnhandledAPI()
|
||||
|
||||
@@ -1028,7 +1028,7 @@ class Cog(CogMixin, DPYCog, metaclass=DPYCogMeta):
|
||||
|
||||
None of your methods should start with ``red_`` or
|
||||
be dunder names which start with red (eg. ``__red_test_thing__``)
|
||||
unless to override behavior in a method designed to be overriden,
|
||||
unless to override behavior in a method designed to be overridden,
|
||||
as this prefix is reserved for future methods in order to be
|
||||
able to add features non-breakingly.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ commands.converter
|
||||
==================
|
||||
This module contains useful functions and classes for command argument conversion.
|
||||
|
||||
Some of the converters within are included provisionaly and are marked as such.
|
||||
Some of the converters within are included provisionally and are marked as such.
|
||||
"""
|
||||
import functools
|
||||
import re
|
||||
@@ -165,7 +165,7 @@ else:
|
||||
|
||||
class DictConverter(dpy_commands.Converter):
|
||||
"""
|
||||
Converts pairs of space seperated values to a dict
|
||||
Converts pairs of space separated values to a dict
|
||||
"""
|
||||
|
||||
def __init__(self, *expected_keys: str, delims: Optional[List[str]] = None):
|
||||
|
||||
@@ -428,17 +428,17 @@ class RedHelpFormatter(HelpFormatterABC):
|
||||
offset += len(embed_dict["embed"]["description"])
|
||||
offset += len(embed_dict["embed"]["title"])
|
||||
|
||||
# In order to only change the size of embeds when neccessary for this rather
|
||||
# In order to only change the size of embeds when necessary for this rather
|
||||
# than change the existing behavior for people uneffected by this
|
||||
# we're only modifying the page char limit should they be impacted.
|
||||
# We could consider changing this to always just subtract the offset,
|
||||
# But based on when this is being handled (very end of 3.2 release)
|
||||
# I'd rather not stick a major visual behavior change in at the last moment.
|
||||
if page_char_limit + offset > 5500:
|
||||
# This is still neccessary with the max interaction above
|
||||
# This is still necessary with the max interaction above
|
||||
# While we could subtract 100% of the time the offset from page_char_limit
|
||||
# the intent here is to shorten again
|
||||
# *only* when neccessary, by the exact neccessary amount
|
||||
# *only* when necessary, by the exact neccessary amount
|
||||
# To retain a visual match with prior behavior.
|
||||
page_char_limit = 5500 - offset
|
||||
elif page_char_limit < 250:
|
||||
@@ -803,7 +803,7 @@ class RedHelpFormatter(HelpFormatterABC):
|
||||
c = menus.DEFAULT_CONTROLS if len(pages) > 1 else {"\N{CROSS MARK}": menus.close_menu}
|
||||
# Allow other things to happen during menu timeout/interaction.
|
||||
asyncio.create_task(menus.menu(ctx, pages, c, message=m))
|
||||
# menu needs reactions added manually since we fed it a messsage
|
||||
# menu needs reactions added manually since we fed it a message
|
||||
menus.start_adding_reactions(m, c.keys())
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ commands.requires
|
||||
=================
|
||||
This module manages the logic of resolving command permissions and
|
||||
requirements. This includes rules which override those requirements,
|
||||
as well as custom checks which can be overriden, and some special
|
||||
as well as custom checks which can be overridden, and some special
|
||||
checks like bot permissions checks.
|
||||
"""
|
||||
import asyncio
|
||||
@@ -385,7 +385,7 @@ class Requires:
|
||||
The ID of the guild for the rule's scope. Set to
|
||||
`Requires.GLOBAL` for a global rule.
|
||||
If a global rule is set for a model,
|
||||
it will be prefered over the guild rule.
|
||||
it will be preferred over the guild rule.
|
||||
|
||||
Returns
|
||||
-------
|
||||
@@ -473,7 +473,7 @@ class Requires:
|
||||
Parameters
|
||||
----------
|
||||
ctx : "Context"
|
||||
The invkokation context to check with.
|
||||
The invocation context to check with.
|
||||
|
||||
Returns
|
||||
-------
|
||||
@@ -486,7 +486,7 @@ class Requires:
|
||||
If the bot is missing required permissions to run the
|
||||
command.
|
||||
CommandError
|
||||
Propogated from any permissions checks.
|
||||
Propagated from any permissions checks.
|
||||
|
||||
"""
|
||||
if not self.ready_event.is_set():
|
||||
@@ -524,7 +524,7 @@ class Requires:
|
||||
cur_state = self._get_rule_from_ctx(ctx)
|
||||
should_invoke, next_state = transition_permstate_to(prev_state, cur_state)
|
||||
if should_invoke is None:
|
||||
# NORMAL invokation, we simply follow standard procedure
|
||||
# NORMAL invocation, we simply follow standard procedure
|
||||
should_invoke = await self._verify_user(ctx)
|
||||
elif isinstance(next_state, dict):
|
||||
# NORMAL to PASSIVE_ALLOW; should we proceed as normal or transition?
|
||||
|
||||
@@ -464,7 +464,7 @@ class Group(Value):
|
||||
|
||||
Note
|
||||
----
|
||||
If retreiving a sub-group, the return value of this method will
|
||||
If retrieving a sub-group, the return value of this method will
|
||||
include registered defaults for values which have not yet been set.
|
||||
|
||||
Parameters
|
||||
@@ -687,7 +687,7 @@ class Config(metaclass=ConfigMeta):
|
||||
Should config require registration of data keys before allowing you
|
||||
to get/set values? See `force_registration`.
|
||||
cog_name : str, optional
|
||||
Config normally uses ``cog_instance`` to determine tha name of your cog.
|
||||
Config normally uses ``cog_instance`` to determine the name of your cog.
|
||||
If you wish you may pass ``None`` to ``cog_instance`` and directly specify
|
||||
the name of your cog here.
|
||||
|
||||
|
||||
@@ -3219,7 +3219,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic):
|
||||
output += ", ".join(members)
|
||||
|
||||
if not output:
|
||||
output = _("No immunty settings here.")
|
||||
output = _("No immunity settings here.")
|
||||
|
||||
for page in pagify(output):
|
||||
await ctx.send(page)
|
||||
|
||||
@@ -106,7 +106,7 @@ class Dev(commands.Cog):
|
||||
lines or asynchronous code, see [p]repl or [p]eval.
|
||||
|
||||
Environment Variables:
|
||||
ctx - command invokation context
|
||||
ctx - command invocation context
|
||||
bot - bot object
|
||||
channel - the current channel object
|
||||
author - command author's member object
|
||||
@@ -160,7 +160,7 @@ class Dev(commands.Cog):
|
||||
as they are not mixed and they are formatted correctly.
|
||||
|
||||
Environment Variables:
|
||||
ctx - command invokation context
|
||||
ctx - command invocation context
|
||||
bot - bot object
|
||||
channel - the current channel object
|
||||
author - command author's member object
|
||||
|
||||
@@ -42,7 +42,7 @@ class LRUDict:
|
||||
def pop(self, key):
|
||||
return self._dict.pop(key)
|
||||
|
||||
# all of the below access all of the items, and therefore shouldnt modify the ordering for eviction
|
||||
# all of the below access all of the items, and therefore shouldn't modify the ordering for eviction
|
||||
def keys(self):
|
||||
return self._dict.keys()
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class ContextManagerMixin(ProvidesCursor):
|
||||
"""
|
||||
Wraps a cursor as a context manager for a transaction
|
||||
which is rolled back on unhandled exception,
|
||||
or commited on non-exception exit
|
||||
or committed on non-exception exit
|
||||
"""
|
||||
c = self.cursor() # pylint: disable=assignment-from-no-return
|
||||
try:
|
||||
|
||||
@@ -240,7 +240,7 @@ async def check_permissions(ctx: "Context", perms: Dict[str, bool]) -> bool:
|
||||
Parameters
|
||||
----------
|
||||
ctx : Context
|
||||
The command invokation context to check.
|
||||
The command invocation context to check.
|
||||
perms : Dict[str, bool]
|
||||
A dictionary mapping permissions to their required states.
|
||||
Valid permission names are those listed as properties of
|
||||
|
||||
@@ -75,7 +75,7 @@ class MessagePredicate(Callable[[discord.Message], bool]):
|
||||
Parameters
|
||||
----------
|
||||
ctx : Optional[Context]
|
||||
The current invokation context.
|
||||
The current invocation context.
|
||||
channel : Optional[discord.TextChannel]
|
||||
The channel we expect a message in. If unspecified,
|
||||
defaults to ``ctx.channel``. If ``ctx`` is unspecified
|
||||
|
||||
@@ -9,7 +9,7 @@ def unsafe(f, message=None):
|
||||
This form may not get used much, but there are a few cases
|
||||
we may want to add something unsafe generally, but safe in specific uses.
|
||||
|
||||
The warning can be supressed in the safe context with warnings.catch_warnings
|
||||
The warning can be suppressed in the safe context with warnings.catch_warnings
|
||||
This should be used sparingly at most.
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user