add gitignore, avoid a null index error and update ytdl_core
This commit is contained in:
parent
6533e85d92
commit
1b59667e43
|
@ -0,0 +1 @@
|
||||||
|
./configs.ts
|
|
@ -58,7 +58,7 @@ export async function play(bot: Bot, interaction: Interaction, _args?) {
|
||||||
}
|
}
|
||||||
// TODO: maybe switch to ytdl and not have to use the deno youtube library?
|
// TODO: maybe switch to ytdl and not have to use the deno youtube library?
|
||||||
const result = await player.pushQuery(interaction.user.username, href);
|
const result = await player.pushQuery(interaction.user.username, href);
|
||||||
if(parsed_url.href.indexOf("youtube.com") !== -1 || parsed_url.href.indexOf("youtu.be") !== -1 && result[0].title) {
|
if(result && parsed_url.href.indexOf("youtube.com") !== -1 || parsed_url.href.indexOf("youtu.be") !== -1 && result[0].title) {
|
||||||
await editOriginalInteractionResponse(bot, interaction.token, addedToQueueResponse(interaction, result[0].title));
|
await editOriginalInteractionResponse(bot, interaction.token, addedToQueueResponse(interaction, result[0].title));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
export const configs = {
|
||||||
|
project_root: "/permanent-waves",
|
||||||
|
discord_token: "",
|
||||||
|
allowed_text_channels: [
|
||||||
|
"server:bot-channel"
|
||||||
|
],
|
||||||
|
allowed_voice_channels: [
|
||||||
|
"server:general"
|
||||||
|
],
|
||||||
|
embed_color: 5639994
|
||||||
|
};
|
|
@ -6,7 +6,7 @@ export {
|
||||||
default as ytdl,
|
default as ytdl,
|
||||||
getInfo,
|
getInfo,
|
||||||
downloadFromInfo,
|
downloadFromInfo,
|
||||||
} from "https://deno.land/x/ytdl_core@v0.1.1/mod.ts";
|
} from "https://deno.land/x/ytdl_core@v0.1.2/mod.ts";
|
||||||
export { ytDownload } from "https://deno.land/x/yt_download@1.1/mod.ts";
|
export { ytDownload } from "https://deno.land/x/yt_download@1.1/mod.ts";
|
||||||
export type { VideoFormat } from "https://deno.land/x/ytdl_core@v0.1.0/src/types.ts";
|
export type { VideoFormat } from "https://deno.land/x/ytdl_core@v0.1.0/src/types.ts";
|
||||||
export { default as YouTube } from "https://deno.land/x/youtube_sr@v4.3.4-deno/mod.ts";
|
export { default as YouTube } from "https://deno.land/x/youtube_sr@v4.3.4-deno/mod.ts";
|
||||||
|
|
Loading…
Reference in New Issue