added history
This commit is contained in:
@@ -3,6 +3,7 @@ import { player } from "./main";
|
||||
import { CacheType, ChatInputCommandInteraction } from "discord.js";
|
||||
import { getAudioFile } from "./util/downloader";
|
||||
import { playSong } from "./util/helpers";
|
||||
import { add_to_history } from "./util/history";
|
||||
|
||||
const queue: Queue = {
|
||||
songList: [],
|
||||
@@ -11,12 +12,14 @@ const queue: Queue = {
|
||||
|
||||
export async function requestSong(
|
||||
interaction: ChatInputCommandInteraction<CacheType>,
|
||||
url: string) {
|
||||
url: string,
|
||||
user?: any
|
||||
) {
|
||||
|
||||
const path = await getAudioFile(url)
|
||||
queue.songList.push({ path, url })
|
||||
add_to_history({ interaction, url })
|
||||
updatePlayer()
|
||||
|
||||
}
|
||||
|
||||
export async function forceRequestSong(
|
||||
|
||||
Reference in New Issue
Block a user