Skip to content

Commit

Permalink
Clarify some docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
flaree committed Jun 7, 2019
1 parent 9ef4f17 commit 4c81ea2
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Expand Up @@ -10,8 +10,8 @@ venv/
rainbow6/r6.png
foco/
wcrp/
make.bat
Makefile
privatecogs/
mrp/
sampservers/
.vscode/launch.json
epl/
21 changes: 21 additions & 0 deletions Makefile
@@ -0,0 +1,21 @@
# Python Code Style
reformat:
black -l 99 `git ls-files "*.py"`
stylecheck:
black --check -l 99 -N `git ls-files "*.py"`

# Translations
gettext:
redgettext --command-docstrings --verbose --recursive redbot --exclude-files "redbot/pytest/**/*"
upload_translations:
$(MAKE) gettext
crowdin upload sources
download_translations:
crowdin download

# Vendoring
REF?=rewrite
update_vendor:
pip install --upgrade --no-deps -t . https://github.com/Rapptz/discord.py/archive/$(REF).tar.gz#egg=discord.py
rm -r discord.py*-info
$(MAKE) reformat
18 changes: 14 additions & 4 deletions highlight/highlight.py
Expand Up @@ -97,21 +97,31 @@ async def toggle(self, ctx, state: bool):
async with self.config.channel(ctx.channel).toggle() as toggle:
if state:
toggle[f"{ctx.author.id}"] = state
await ctx.send("You've enabled highlighting on this channel.")
await ctx.send(
"{} has enabled their highlighting on this channel.".format(ctx.author.name)
)
elif not state:
toggle[f"{ctx.author.id}"] = state
await ctx.send("You've disabled highlighting on this channel.")
await ctx.send(
"{} has enabled their highlighting on this channel.".format(ctx.author.name)
)

@highlight.command()
async def bots(self, ctx, state: bool):
"""Toggle highlighting on bot messages."""
async with self.config.channel(ctx.channel).ignore() as ignore:
if state:
ignore[f"{ctx.author.id}"] = state
await ctx.send("Bots messages will now be included in highlighted messages")
await ctx.send(
"Bots messages will now be included in {}'s highlighted messages".format(
ctx.author.name
)
)
elif not state:
ignore[f"{ctx.author.id}"] = state
await ctx.send("Bot messages will not longer be highlighted.")
await ctx.send(
"Bot messages will not longer be highlighted for {}.".format(ctx.author.name)
)

@highlight.command()
async def list(self, ctx, channel: Optional[discord.TextChannel] = None):
Expand Down
10 changes: 5 additions & 5 deletions modmail/modmail.py
Expand Up @@ -141,7 +141,7 @@ async def list(self, ctx):

@modmailset.command()
async def toggle(self, ctx, mode: bool):
"""Toggle modmail."""
"""Toggle modmail on the current channel."""
async with self.config.toggle() as toggle:
if mode:
toggle["status"] = True
Expand All @@ -152,9 +152,9 @@ async def toggle(self, ctx, mode: bool):

@modmailset.command()
async def dms(self, ctx, mode: bool):
"""Toggle modmail forwarding from DMs
True - Allow DM Forwarding
False - Disallow DM Forwarding"""
"""Toggle modmail forwarding from DMs.
True - Allow DM Forwarding.
False - Disallow DM Forwarding."""
async with self.config.toggle() as toggle:
if mode:
toggle["dms"] = True
Expand All @@ -165,7 +165,7 @@ async def dms(self, ctx, mode: bool):

@modmailset.command()
async def respond(self, ctx, mode: bool):
"""Toggle responding to modmail"""
"""Toggle responding to modmail."""
async with self.config.toggle() as toggle:
if mode:
toggle["respond"] = True
Expand Down
1 change: 1 addition & 0 deletions r6/info.json
Expand Up @@ -6,5 +6,6 @@
"short": "Show R6 player info",
"description": "List R6 stats from whatever season and/or operator stats etc.",
"tags": ["r6", "stats", "operators"],
"requirements": ["pillow"],
"hidden": true
}

0 comments on commit 4c81ea2

Please sign in to comment.