Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Commit

Permalink
Add command description
Browse files Browse the repository at this point in the history
  • Loading branch information
norinorin committed Oct 28, 2021
1 parent 23ebf42 commit 684a6bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions nokari/plugins/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ def get_disc_text(disc_number: int) -> str:
@spotify.command(name="playlist")
@core.cooldown(1, 2, lightbulb.cooldowns.UserBucket)
async def spotify_playlist(self, ctx: Context, *, query: str) -> None:
"""Displays the information about a playlist on Spotify."""
playlist = await self.spotify_client.get_item(ctx, query, Playlist)
playlist = await self.spotify_client.ensure_playlist(playlist)
cover = await self.spotify_client._get_album(playlist.cover_url)
Expand Down
4 changes: 3 additions & 1 deletion nokari/utils/spotify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,9 @@ async def pick_from_sequence(
)
return seq[int(interaction.values[0])]

await respond.delete()
with suppress(hikari.NotFoundError):
await respond.delete()

return None

async def ensure_playlist(self, playlist: SimplifiedPlaylist) -> Playlist:
Expand Down

0 comments on commit 684a6bd

Please sign in to comment.