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 :/');
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { CacheType, ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
|
||||
import { msg_help } from '../messages';
|
||||
|
||||
const name = "help"
|
||||
|
||||
@@ -9,7 +10,7 @@ function register() {
|
||||
}
|
||||
|
||||
async function execute(interaction: ChatInputCommandInteraction<CacheType>) {
|
||||
await interaction.reply('Jak ci się kurwa nie podoba to tutaj proszę o pull requesty https://gitea.papryk.com/Papryk/dj-spangebob');
|
||||
await interaction.reply(msg_help());
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { CacheType, ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
|
||||
import { connectToChannelByInteraction } from '../util/helpers';
|
||||
import { requestSong } from '../playback';
|
||||
import { getPlayMsg } from '../messages';
|
||||
import { getPlayMsg, msg_downloading, msg_play, msg_searching } from '../messages';
|
||||
import { search } from '../util/downloader';
|
||||
|
||||
const name = "play"
|
||||
@@ -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 requestSong(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 :/');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { CacheType, ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
|
||||
import { getQueue } from '../playback';
|
||||
import { msg_play } from '../messages';
|
||||
|
||||
const name = "queue"
|
||||
|
||||
@@ -10,11 +10,8 @@ function register() {
|
||||
}
|
||||
|
||||
async function execute(interaction: ChatInputCommandInteraction<CacheType>) {
|
||||
console.log(interaction.member)
|
||||
const queue = getQueue()
|
||||
await interaction.reply(`Current: ${queue.current}
|
||||
Queue:
|
||||
${queue.songList.join('\n ')}`);
|
||||
await interaction.deferReply()
|
||||
await interaction.editReply(msg_play());
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { CacheType, ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
|
||||
import { skip_song } from '../playback';
|
||||
import { msg_skipped } from '../messages';
|
||||
|
||||
const name = "skip"
|
||||
|
||||
@@ -12,8 +13,8 @@ function register() {
|
||||
async function execute(interaction: ChatInputCommandInteraction<CacheType>) {
|
||||
try {
|
||||
await interaction.deferReply()
|
||||
skip_song()
|
||||
await interaction.editReply('skipped');
|
||||
const skipped = skip_song()
|
||||
await interaction.editReply(msg_skipped(skipped));
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
await interaction.reply('Coś poszło nie tak :/');
|
||||
|
||||
Reference in New Issue
Block a user