From d7ea23a474492980268924cb8cbf0d81573ffb89 Mon Sep 17 00:00:00 2001 From: DevAndromeda <46562212+DevAndromeda@users.noreply.github.com> Date: Sun, 8 Aug 2021 11:46:09 +0545 Subject: [PATCH] fix(example): use dotenv --- .gitignore | 3 ++- example/music-bot/config.js | 2 +- example/music-bot/index.js | 1 + example/music-bot/package.json | 5 +++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e8e1662..ce3a6ea 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ yarn*.log # example example/test example/music-bot/node_modules -example/music-bot/package-lock.json \ No newline at end of file +example/music-bot/package-lock.json +example/music-bot/.env \ No newline at end of file diff --git a/example/music-bot/config.js b/example/music-bot/config.js index e9ad43e..50f225e 100644 --- a/example/music-bot/config.js +++ b/example/music-bot/config.js @@ -1,3 +1,3 @@ module.exports = { - token: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + token: process.env.DISCORD_TOKEN }; diff --git a/example/music-bot/index.js b/example/music-bot/index.js index 5a85701..a21d38e 100644 --- a/example/music-bot/index.js +++ b/example/music-bot/index.js @@ -1,3 +1,4 @@ +require("dotenv").config(); const { Client, GuildMember } = require("discord.js"); const config = require("./config"); const { Player, QueryType, QueueRepeatMode } = require("discord-player"); diff --git a/example/music-bot/package.json b/example/music-bot/package.json index 8eab638..76141e0 100644 --- a/example/music-bot/package.json +++ b/example/music-bot/package.json @@ -10,7 +10,8 @@ "license": "MIT", "dependencies": { "@discordjs/opus": "^0.5.3", - "discord-player": "^5.0.0-dev.39f503a.1625470163", - "discord.js": "^13.0.1" + "discord-player": "^5.0.0", + "discord.js": "^13.0.1", + "dotenv": "^10.0.0" } }