Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #52 from parafoxia/develop
Browse files Browse the repository at this point in the history
Merge to release 1.1.1
  • Loading branch information
parafoxia authored Sep 11, 2020
2 parents 88a59ff + 373c454 commit 649bd45
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,4 @@ secrets/
*.db3-wal
TODO
DESCRIPTION.md
copy-db.txt
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "Solaris-Bot"
version = "1.1.0"
version = "1.1.1"
description = "A Discord bot designed to make your server a safer and better place."

license = "GPLv3"
Expand Down
2 changes: 1 addition & 1 deletion solaris/bot/cogs/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async def get_command_mapping(self, ctx):
name="help",
help="Help with anything Solaris. Passing a command name or alias through will show help with that specific command, while passing no arguments will bring up a general command overview.",
)
async def help_command(self, ctx, cmd: t.Optional[t.Union[converters.Command, str]]):
async def help_command(self, ctx, *, cmd: t.Optional[t.Union[converters.Command, str]]):
prefix = await self.bot.prefix(ctx.guild)

if isinstance(cmd, str):
Expand Down
6 changes: 3 additions & 3 deletions solaris/bot/cogs/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ async def channelinfo_command(
("Slowmode delay", f"{target.slowmode_delay:,} second(s)", True),
("Created on", chron.long_date(target.created_at), True),
("Existed for", chron.short_delta(dt.datetime.utcnow() - target.created_at), True),
("Topic", target.topic or "This channel does not have a topic.", False),
("Topic", target.topic or "-", False),
),
)
)
Expand Down Expand Up @@ -600,7 +600,7 @@ async def roleinfo_command(self, ctx, *, target: t.Optional[t.Union[discord.Role
("Mentionable?", target.mentionable, True),
("Admin?", target.permissions.administrator, True),
("Position", f"{string.ordinal(ngr - target.position)} / {ngr:,}", True),
("Colour", f"#{str(target.colour)}", True),
("Colour", f"{str(target.colour)}", True),
("Members", f"{len(target.members):,}", True),
("Created on", chron.long_date(target.created_at), True),
("Existed for", chron.short_delta(dt.datetime.utcnow() - target.created_at), True),
Expand Down Expand Up @@ -642,7 +642,7 @@ async def messageinfo_command(self, ctx, target: t.Union[discord.Message, str]):
("Last edited on", chron.long_date(target.created_at), True),
(
"Content",
target.content if len(target.content) <= 1024 else f"{target.content[:1021]}...",
(target.content if len(target.content) <= 1024 else f"{target.content[:1021]}...") or "-",
False,
),
),
Expand Down
2 changes: 1 addition & 1 deletion solaris/utils/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async def convert(self, ctx, arg):
else:
# Check for subcommands.
for cmd in ctx.bot.walk_commands():
if cmd.name == arg:
if arg == f"{cmd.parent.name} {cmd.name}":
return cmd
raise commands.BadArgument

Expand Down
2 changes: 1 addition & 1 deletion solaris/utils/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_value(self, key, args, kwargs):


def safe_format(text, *args, **kwargs):
formatter = Formatter()
formatter = MessageFormatter()
return formatter.format(text, *args, **kwargs)


Expand Down

0 comments on commit 649bd45

Please sign in to comment.