format wiadomości
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { CacheType, ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
|
||||
import { connectToChannelByInteraction } from '../util/helpers';
|
||||
import { forceRequestSong } from '../playback';
|
||||
import { getPlayMsg } from '../messages';
|
||||
import { getPlayMsg, msg_downloading, msg_play, msg_searching } from '../messages';
|
||||
import { search } from '../util/downloader';
|
||||
|
||||
const name = "forceplay"
|
||||
@@ -26,16 +26,16 @@ async function execute(interaction: ChatInputCommandInteraction<CacheType>) {
|
||||
if (input.startsWith("http")) {
|
||||
url = input
|
||||
} else {
|
||||
await interaction.editReply(`searching for: ${input}`);
|
||||
await interaction.editReply(msg_searching(input));
|
||||
url = await search(input)
|
||||
console.log(input, url)
|
||||
}
|
||||
|
||||
await interaction.editReply(`downloading: ${url}`);
|
||||
await interaction.editReply(msg_downloading(url));
|
||||
await forceRequestSong(interaction, url)
|
||||
|
||||
const msg = getPlayMsg(url)
|
||||
await interaction.editReply(msg);
|
||||
await interaction.editReply(msg_play());
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
await interaction.editReply('Coś poszło nie tak :/');
|
||||
|
||||
Reference in New Issue
Block a user