Data API Complicance (Red 3.4) (#136)

* Simple ones first

* Less simple but still simple.

* Slightly more complicated

* use correct name

* move to module

* Black -l 120

* review

* give users the proper feedback

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
This commit is contained in:
Draper
2020-08-26 17:57:43 +01:00
committed by GitHub
parent 4376194429
commit ae9dbf569c
95 changed files with 593 additions and 703 deletions

View File

@@ -1,5 +1,7 @@
from .icyparser import IcyParser
__red_end_user_data_statement__ = "This cog does not persistently store data or metadata about users."
def setup(bot):
bot.add_cog(IcyParser(bot))

View File

@@ -7,6 +7,10 @@ from redbot.core import commands
class IcyParser(commands.Cog):
async def red_delete_data_for_user(self, **kwargs):
""" Nothing to delete """
return
def __init__(self, bot):
self.bot = bot
self.session = aiohttp.ClientSession()
@@ -69,9 +73,7 @@ class IcyParser(commands.Cog):
f"Can't read the stream information for <{player.current.uri if not url else url}>, it may not be an Icecast or Shoutcast radio station or there may be no stream information available."
)
song = f"**[{icy[0]}]({player.current.uri if not url else url})**\n"
embed = discord.Embed(
colour=await ctx.embed_colour(), title="Now Playing", description=song
)
embed = discord.Embed(colour=await ctx.embed_colour(), title="Now Playing", description=song)
if icy[2]:
embed.set_thumbnail(url=icy[1])
await ctx.send(embed=embed)

View File

@@ -10,5 +10,6 @@
"icecast",
"shoutcast"
],
"type": "COG"
"type": "COG",
"end_user_data_statement": "This cog does not persistently store data or metadata about users."
}