diff --git a/redbot/cogs/streams/streams.py b/redbot/cogs/streams/streams.py index 5570afc9e..fc8c2138c 100644 --- a/redbot/cogs/streams/streams.py +++ b/redbot/cogs/streams/streams.py @@ -497,14 +497,13 @@ class Streams(commands.Cog): @message.command(name="mention") @commands.guild_only() - async def with_mention(self, ctx: commands.Context, message: str = None): + async def with_mention(self, ctx: commands.Context, *, message: str = None): """Set stream alert message when mentions are enabled. Use `{mention}` in the message to insert the selected mentions. + Use `{stream}` in the message to insert the channel or user name. - Use `{stream.name}` in the message to insert the channel or user name. - - For example: `[p]streamset message mention "{mention}, {stream.name} is live!"` + For example: `[p]streamset message mention {mention}, {stream} is live!` """ if message is not None: guild = ctx.guild @@ -515,12 +514,12 @@ class Streams(commands.Cog): @message.command(name="nomention") @commands.guild_only() - async def without_mention(self, ctx: commands.Context, message: str = None): + async def without_mention(self, ctx: commands.Context, *, message: str = None): """Set stream alert message when mentions are disabled. - Use `{stream.name}` in the message to insert the channel or user name. + Use `{stream}` in the message to insert the channel or user name. - For example: `[p]streamset message nomention "{stream.name} is live!"` + For example: `[p]streamset message nomention {stream} is live!` """ if message is not None: guild = ctx.guild @@ -720,7 +719,12 @@ class Streams(commands.Cog): channel.guild ).live_message_mention() if alert_msg: - content = alert_msg.format(mention=mention_str, stream=stream) + content = alert_msg # Stop bad things from happening here... + content = content.replace( + "{stream.name}", str(stream.name) + ) # Backwards compatability + content = content.replace("{stream}", str(stream.name)) + content = content.replace("{mention}", mention_str) else: content = _("{mention}, {stream} is live!").format( mention=mention_str, @@ -733,7 +737,11 @@ class Streams(commands.Cog): channel.guild ).live_message_nomention() if alert_msg: - content = alert_msg.format(stream=stream) + content = alert_msg # Stop bad things from happening here... + content = content.replace( + "{stream.name}", str(stream.name) + ) # Backwards compatability + content = content.replace("{stream}", str(stream.name)) else: content = _("{stream} is live!").format( stream=escape(