mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[i18n/Streams] Change strings mentioning commands to use {command} variable (#3938)
* hopefully all strings in streams.py * black streams.py * don't touch docstrings * uniformity is good * thx draper Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com> * aaaaaaaaaaaaaaaaaaaaaa * translate more * sure, joining some strings for jack Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * more strings to join Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * yup... I missed this Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * jaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaack blaaaaaaaaaaaaaaaaaaaaaack Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com> Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
parent
477186d09d
commit
df410529b0
@ -141,11 +141,14 @@ class Streams(commands.Cog):
|
||||
'2. Click "Manage" on your application.\n'
|
||||
'3. Click on "New secret".\n'
|
||||
"5. Copy your client ID and your client secret into:\n"
|
||||
"`[p]set api twitch client_id <your_client_id_here> "
|
||||
"client_secret <your_client_secret_here>`\n\n"
|
||||
"Note: These tokens are sensitive and should "
|
||||
"only be used in a private channel "
|
||||
"{command}"
|
||||
"\n\n"
|
||||
"Note: These tokens are sensitive and should only be used in a private channel "
|
||||
"or in DM with the bot."
|
||||
).format(
|
||||
command="`[p]set api twitch client_id {} client_secret {}`".format(
|
||||
_("<your_client_id_here>"), _("<your_client_secret_here>")
|
||||
)
|
||||
)
|
||||
if notified_owner_missing_twitch_secret is False:
|
||||
await send_to_owners_with_prefix_replaced(self.bot, message)
|
||||
@ -250,17 +253,15 @@ class Streams(commands.Cog):
|
||||
await ctx.send(_("That channel doesn't seem to exist."))
|
||||
except InvalidTwitchCredentials:
|
||||
await ctx.send(
|
||||
_(
|
||||
"The Twitch token is either invalid or has not been set. See "
|
||||
"`{prefix}streamset twitchtoken`."
|
||||
).format(prefix=ctx.clean_prefix)
|
||||
_("The Twitch token is either invalid or has not been set. See {command}.").format(
|
||||
command=f"`{ctx.clean_prefix}streamset twitchtoken`"
|
||||
)
|
||||
)
|
||||
except InvalidYoutubeCredentials:
|
||||
await ctx.send(
|
||||
_(
|
||||
"The YouTube API key is either invalid or has not been set. See "
|
||||
"`{prefix}streamset youtubekey`."
|
||||
).format(prefix=ctx.clean_prefix)
|
||||
"The YouTube API key is either invalid or has not been set. See {command}."
|
||||
).format(command=f"`{ctx.clean_prefix}streamset youtubekey`")
|
||||
)
|
||||
except APIError:
|
||||
await ctx.send(
|
||||
@ -405,17 +406,16 @@ class Streams(commands.Cog):
|
||||
except InvalidTwitchCredentials:
|
||||
await ctx.send(
|
||||
_(
|
||||
"The Twitch token is either invalid or has not been set. See "
|
||||
"`{prefix}streamset twitchtoken`."
|
||||
).format(prefix=ctx.clean_prefix)
|
||||
"The Twitch token is either invalid or has not been set. See {command}."
|
||||
).format(command=f"`{ctx.clean_prefix}streamset twitchtoken`")
|
||||
)
|
||||
return
|
||||
except InvalidYoutubeCredentials:
|
||||
await ctx.send(
|
||||
_(
|
||||
"The YouTube API key is either invalid or has not been set. See "
|
||||
"`{prefix}streamset youtubekey`."
|
||||
).format(prefix=ctx.clean_prefix)
|
||||
"{command}."
|
||||
).format(command=f"`{ctx.clean_prefix}streamset youtubekey`")
|
||||
)
|
||||
return
|
||||
except APIError:
|
||||
@ -452,7 +452,6 @@ class Streams(commands.Cog):
|
||||
@checks.is_owner()
|
||||
async def twitchtoken(self, ctx: commands.Context):
|
||||
"""Explain how to set the twitch token."""
|
||||
|
||||
message = _(
|
||||
"To set the twitch API tokens, follow these steps:\n"
|
||||
"1. Go to this page: https://dev.twitch.tv/dashboard/apps.\n"
|
||||
@ -461,11 +460,15 @@ class Streams(commands.Cog):
|
||||
"select an Application Category of your choosing.\n"
|
||||
"4. Click *Register*.\n"
|
||||
"5. Copy your client ID and your client secret into:\n"
|
||||
"`{prefix}set api twitch client_id <your_client_id_here> "
|
||||
"client_secret <your_client_secret_here>`\n\n"
|
||||
"{command}"
|
||||
"\n\n"
|
||||
"Note: These tokens are sensitive and should only be used in a private channel\n"
|
||||
"or in DM with the bot.\n"
|
||||
).format(prefix=ctx.clean_prefix)
|
||||
).format(
|
||||
command="`{}set api twitch client_id {} client_secret {}`".format(
|
||||
ctx.clean_prefix, _("<your_client_id_here>"), _("<your_client_secret_here>")
|
||||
)
|
||||
)
|
||||
|
||||
await ctx.maybe_send_embed(message)
|
||||
|
||||
@ -483,10 +486,14 @@ class Streams(commands.Cog):
|
||||
"3. Set up your API key \n"
|
||||
"(see https://support.google.com/googleapi/answer/6158862 for instructions)\n"
|
||||
"4. Copy your API key and run the command "
|
||||
"`{prefix}set api youtube api_key <your_api_key_here>`\n\n"
|
||||
"{command}\n\n"
|
||||
"Note: These tokens are sensitive and should only be used in a private channel\n"
|
||||
"or in DM with the bot.\n"
|
||||
).format(prefix=ctx.clean_prefix)
|
||||
).format(
|
||||
command="`{}set api youtube api_key {}`".format(
|
||||
ctx.clean_prefix, _("<your_api_key_here>")
|
||||
)
|
||||
)
|
||||
|
||||
await ctx.maybe_send_embed(message)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user