Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/appujet/lavamusic
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed Aug 15, 2024
2 parents b7df8ab + e0ad3e5 commit 851d942
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions locales/EnglishUS.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
}
},
"grab": {
"loading": "Loading...",
"description": "Grabs the current playing song on your DM",
"content": "**Duration:** {length}\n**Requested by:** <@{requester}>\n**Link:** [Click here]({uri})",
"check_dm": "Please check your DM.",
Expand Down
6 changes: 4 additions & 2 deletions src/commands/music/Grab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export default class Grab extends Command {
public async run(client: Lavamusic, ctx: Context): Promise<any> {
const player = client.queue.get(ctx.guild!.id);

await ctx.sendDeferMessage(ctx.locale("cmd.grab.loading"));

if (!player?.current) {
return await ctx.sendMessage({
embeds: [this.client.embed().setColor(this.client.color.red).setDescription(ctx.locale("player.errors.no_song"))],
Expand Down Expand Up @@ -62,11 +64,11 @@ export default class Grab extends Command {
],
});

return await ctx.sendMessage({
return await ctx.editMessage({
embeds: [this.client.embed().setDescription(ctx.locale("cmd.grab.check_dm")).setColor(this.client.color.green)],
});
} catch (_e) {
return await ctx.sendMessage({
return await ctx.editMessage({
embeds: [this.client.embed().setDescription(ctx.locale("cmd.grab.dm_failed")).setColor(this.client.color.red)],
});
}
Expand Down

0 comments on commit 851d942

Please sign in to comment.