mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-26 04:33:00 -05:00
Apply suggestions from code review
Co-authored-by: Vuks <51289041+Vuks69@users.noreply.github.com>
This commit is contained in:
@@ -87,7 +87,7 @@ class QueueInterface:
|
||||
try:
|
||||
row_result = future.result()
|
||||
except Exception as exc:
|
||||
debug_exc_log(log, exc, "Failed to completed playlist fetch from database")
|
||||
debug_exc_log(log, exc, "Failed to complete playlist fetch from database")
|
||||
return []
|
||||
|
||||
async for index, row in AsyncIter(row_result).enumerate(start=1):
|
||||
|
||||
@@ -630,12 +630,12 @@ class PlayerCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
"""Pick a track with a search.
|
||||
|
||||
Use `[p]search list <search term>` to queue all tracks found on YouTube. Use `[p]search sc
|
||||
<search term>` will search SoundCloud instead of YouTube.
|
||||
<search term>` to search on SoundCloud instead of YouTube.
|
||||
"""
|
||||
|
||||
if not isinstance(query, (str, Query)):
|
||||
raise RuntimeError(
|
||||
f"Expect 'query' to be a string or Query object but recieved: {type(query)} is an unexpected argument type please report it."
|
||||
f"Expected 'query' to be a string or Query object but received: {type(query)} - this is an unexpected argument type, please report it."
|
||||
)
|
||||
|
||||
async def _search_menu(
|
||||
|
||||
@@ -139,13 +139,13 @@ class StartUpTasks(MixinMeta, metaclass=CompositeMetaClass):
|
||||
|
||||
Audio version 2.3.0+ brings you access to the **Global Audio API**, `[p]help audioset globalapi` for more info, this **API is disabled by default and will never be enabled until you manually enable it**.
|
||||
|
||||
This API will allow your to use the Spotify functionally of Audio with a much smaller YouTube API key, as it will attempt to look for results in the API before using your key.
|
||||
This API will also be help your bot by reducing the likelihood of YouTube rate-limiting your bot for making requests too often.
|
||||
This API will allow your to use the Spotify functionally of Audio with a much smaller YouTube API key usage, as it will attempt to look for results in the API before using your key.
|
||||
This API will also help your bot by reducing the likelihood of YouTube rate-limiting your bot for making requests too often.
|
||||
|
||||
To use this API **you will be required to have an access token**, to obtain this token please join <https://discordapp.com/invite/zkmDzhs> and read the instructions there.
|
||||
Note: Just like any request your bot makes this service will be able to see your bot IP, your IP is not used for anything in the server but we felt that disclosing this to potential user is an important step since the service is managed by Draper and Cog-Creators org.
|
||||
Note: Just like any request your bot makes this service will be able to see your bot IP, your IP is not used for anything in the server but we felt that disclosing this to potential users is an important step since the service is managed by Draper and Cog-Creators org.
|
||||
|
||||
Since I'm already sending this message, I would highly recommend that you enable your local cache if you havent yet, to do so you can run `[p]audioset cache 5` this cache only stores metadata so it shouldn't use up a lot of space, however it will make repeated audio requests faster and further reduce the likelihook of YouTube rate limiting your bot."""
|
||||
Since I'm already sending this message, I would highly recommend that you enable your local cache if you haven't yet, to do so you can run `[p]audioset cache 5` This cache only stores metadata so it shouldn't use up a lot of space, however it will make repeated audio requests faster and further reduce the likelihood of YouTube rate-limiting your bot."""
|
||||
)
|
||||
await send_to_owners_with_prefix_replaced(self.bot, msg)
|
||||
await self.config.owner_notification.set(1)
|
||||
|
||||
@@ -375,7 +375,7 @@ class FormattingUtilities(MixinMeta, metaclass=CompositeMetaClass):
|
||||
return None
|
||||
|
||||
def format_playlist_picker_data(self, pid, pname, ptracks, pauthor, scope) -> str:
|
||||
"""Format the values into a pretified codeblock."""
|
||||
"""Format the values into a prettified codeblock."""
|
||||
author = self.bot.get_user(pauthor) or pauthor or _("Unknown")
|
||||
line = _(
|
||||
" - Name: <{pname}>\n"
|
||||
|
||||
Reference in New Issue
Block a user