mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 18:59:19 +00:00
Add embed info for play and search command
This commit is contained in:
@@ -6,6 +6,19 @@ import DiscordMusicPlayer, { ValidTracks } from "../../providers/DiscordMusicPla
|
||||
import { joinVoiceChannelProcedure } from "./Join";
|
||||
|
||||
const EMBEDS = {
|
||||
PLAY_INFO: (data: Message | Interaction) => {
|
||||
return makeInfoEmbed ({
|
||||
title: 'Play',
|
||||
description: `Play a song`,
|
||||
fields: [
|
||||
{
|
||||
name: 'Arguments',
|
||||
value: '``Search query or Link``'
|
||||
}
|
||||
],
|
||||
user: (data instanceof Interaction) ? data.user : data.author
|
||||
});
|
||||
},
|
||||
YOUTUBE_ONLY: (data: Message | Interaction) => {
|
||||
return makeErrorEmbed({
|
||||
title: `Only youtube.com link is supported for now`,
|
||||
@@ -128,9 +141,7 @@ export default class Play {
|
||||
if (data === null || !data.guildId || data.member === null || data.guild === null) return;
|
||||
|
||||
if (args.length === 0) {
|
||||
// TODO: Show info
|
||||
//return await sendMessageOrInteractionResponse(data, { embeds: [EMBEDS.MSINFO(data)] });
|
||||
return;
|
||||
return await sendMessageOrInteractionResponse(data, { embeds: [EMBEDS.PLAY_INFO(data)] });
|
||||
}
|
||||
query = args.join(' ');
|
||||
|
||||
|
||||
@@ -7,6 +7,19 @@ import Prisma from "../../providers/Prisma";
|
||||
import { joinVoiceChannelProcedure } from "./Join";
|
||||
|
||||
const EMBEDS = {
|
||||
SEARCH_INFO: (data: Message | Interaction) => {
|
||||
return makeInfoEmbed ({
|
||||
title: 'Search',
|
||||
description: `Search for a song`,
|
||||
fields: [
|
||||
{
|
||||
name: 'Arguments',
|
||||
value: '``Search query``'
|
||||
}
|
||||
],
|
||||
user: (data instanceof Interaction) ? data.user : data.author
|
||||
});
|
||||
},
|
||||
SEARCH_RESULT: (data: Message | Interaction, result: ValidTracks[]) => {
|
||||
return makeInfoEmbed({
|
||||
title: `Search result`,
|
||||
@@ -97,9 +110,7 @@ export default class Search {
|
||||
if (data === null || !data.guildId || data.member === null || data.guild === null) return;
|
||||
|
||||
if (args.length === 0) {
|
||||
// TODO: Show info
|
||||
//return await sendMessageOrInteractionResponse(data, { embeds: [EMBEDS.MSINFO(data)] });
|
||||
return;
|
||||
return await sendMessageOrInteractionResponse(data, { embeds: [EMBEDS.SEARCH_INFO(data)] });
|
||||
}
|
||||
query = args.join(' ');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user