Skip to content

Commit

Permalink
[Spotify] Don't try to send an empty message if no scopes are provided
Browse files Browse the repository at this point in the history
  • Loading branch information
TrustyJAID committed Apr 23, 2024
1 parent 333ef5c commit 09e2684
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spotify/spotify_commands.py
Expand Up @@ -75,6 +75,8 @@

class SpotifyCommands(SpotifyMixin):
@commands.hybrid_group(name="spotify", aliases=["sp"])
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.allowed_installs(guilds=True, users=True)
async def spotify_com(self, ctx: commands.Context):
"""
Spotify commands
Expand Down Expand Up @@ -465,7 +467,10 @@ async def spotify_api_scope(self, ctx: commands.Context, *scopes: ScopeConverter
msg += _("The following scopes were added: {added}\n").format(added=add)
if rem:
_("The following scopes were removed: {removed}\n").format(removed=rem)
await ctx.maybe_send_embed(msg)
if msg:
await ctx.maybe_send_embed(msg)
else:
await ctx.send(_("No Scope settings have been changed."))

@spotify_set.command(name="currentscope", aliases=["currentscopes"], with_app_command=False)
@commands.is_owner()
Expand Down

0 comments on commit 09e2684

Please sign in to comment.