mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-08 18:32:32 -05:00
Remove support for Audio's Global API (#5143)
* Force-disable Audio's Global API functionality * Remove owner message about global API * Two more comments * Update CODEOWNERS * Bring back the owner notification, modified to not mention global DB * Remove the global api group fully, remove the mentions of it
This commit is contained in:
@@ -39,7 +39,6 @@ class StartUpTasks(MixinMeta, metaclass=CompositeMetaClass):
|
||||
await self.bot.wait_until_red_ready()
|
||||
# Unlike most cases, we want the cache to exit before migration.
|
||||
try:
|
||||
await self.maybe_message_all_owners()
|
||||
self.db_conn = APSWConnectionWrapper(
|
||||
str(cog_data_path(self.bot.get_cog("Audio")) / "Audio.db")
|
||||
)
|
||||
@@ -246,21 +245,3 @@ class StartUpTasks(MixinMeta, metaclass=CompositeMetaClass):
|
||||
return
|
||||
del metadata
|
||||
del all_guilds
|
||||
|
||||
async def maybe_message_all_owners(self):
|
||||
current_notification = await self.config.owner_notification()
|
||||
if current_notification == _OWNER_NOTIFICATION:
|
||||
return
|
||||
if current_notification < 1 <= _OWNER_NOTIFICATION:
|
||||
msg = _(
|
||||
"""Hello, this message brings you an important update regarding the core Audio cog:
|
||||
|
||||
Starting from Audio v2.3.0+ you can take advantage of the **Global Audio API**, a new service offered by the Cog-Creators organization that allows your bot to greatly reduce the amount of requests done to YouTube / Spotify. This reduces the likelihood of YouTube rate-limiting your bot for making requests too often.
|
||||
See `[p]help audioset globalapi` for more information.
|
||||
Access to this service is disabled by default and **requires you to explicitly opt-in** to start using it.
|
||||
|
||||
An access token is **required** to use this API. To obtain this token you may join <https://discord.gg/red> and run `?audioapi register` in the #testing channel.
|
||||
Note: by using this service you accept that your bot's IP address will be disclosed to the Cog-Creators organization and used only for the purpose of providing the Global API service."""
|
||||
)
|
||||
await send_to_owners_with_prefix_replaced(self.bot, msg)
|
||||
await self.config.owner_notification.set(1)
|
||||
|
||||
Reference in New Issue
Block a user