Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasB25 committed Jul 14, 2024
1 parent 8c35ec6 commit 714c6c1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/commands/playlist/Remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { Command, type Context, type Lavamusic } from "../../structures/index.js
export default class RemoveSong extends Command {
constructor(client: Lavamusic) {
super(client, {
name: "remove",
name: "removesong",
description: {
content: "Removes a song from the playlist",
examples: ["remove <playlist> <song>"],
usage: "remove <playlist> <song>",
examples: ["removesong <playlist> <song>"],
usage: "removesong <playlist> <song>",
},
category: "playlist",
aliases: ["d"],
Expand Down
13 changes: 9 additions & 4 deletions src/commands/playlist/Steal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ export default class StealPlaylist extends Command {
let targetUser = ctx.args[0];

if (targetUser?.startsWith("<@") && targetUser.endsWith(">")) {

targetUser = targetUser.slice(2, -1);

if (targetUser.startsWith('!')) {
if (targetUser.startsWith("!")) {
targetUser = targetUser.slice(1);
}

Expand All @@ -78,7 +77,10 @@ export default class StealPlaylist extends Command {
const targetPlaylist = await client.db.getPlaylist(targetUserId, playlistName);

if (!targetPlaylist) {
const playlistNotFoundError = this.client.embed().setDescription("[That playlist doesn't exist for the mentioned user]").setColor(this.client.color.red);
const playlistNotFoundError = this.client
.embed()
.setDescription("[That playlist doesn't exist for the mentioned user]")
.setColor(this.client.color.red);
return await ctx.sendMessage({ embeds: [playlistNotFoundError] });
}

Expand All @@ -92,7 +94,10 @@ export default class StealPlaylist extends Command {
await ctx.sendMessage({ embeds: [successMessage] });
} catch (error) {
console.error(error);
const errorMessage = this.client.embed().setDescription("[An error occurred while stealing the playlist]").setColor(this.client.color.red);
const errorMessage = this.client
.embed()
.setDescription("[An error occurred while stealing the playlist]")
.setColor(this.client.color.red);
await ctx.sendMessage({ embeds: [errorMessage] });
}
}
Expand Down

0 comments on commit 714c6c1

Please sign in to comment.