Change to process.env

This commit is contained in:
Daniel Odendahl Jr
2017-08-13 01:33:56 +00:00
parent e75251b3f9
commit 71c9691419
23 changed files with 46 additions and 248 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
const snekfetch = require('snekfetch');
const codes = require('../../assets/json/translate');
const { yandexKey } = require('../../config');
const { YANDEX_KEY } = process.env;
module.exports = class TranslateCommand extends Command {
constructor(client) {
@@ -53,7 +53,7 @@ module.exports = class TranslateCommand extends Command {
const { body } = await snekfetch
.get('https://translate.yandex.net/api/v1.5/tr.json/translate')
.query({
key: yandexKey,
key: YANDEX_KEY,
text,
lang: from ? `${from}-${to}` : to
});