Update env vars

This commit is contained in:
Daniel Odendahl Jr
2017-12-13 15:18:47 +00:00
parent 5c6bac5bd9
commit c01530c5d1
4 changed files with 11 additions and 10 deletions
+3 -2
View File
@@ -2,7 +2,7 @@ const { Command } = require('discord.js-commando');
const { MessageEmbed } = require('discord.js');
const snekfetch = require('snekfetch');
const { shorten } = require('../../util/Util');
const { GITHUB_LOGIN } = process.env;
const { GITHUB_USERNAME, GITHUB_PASSWORD } = process.env;
module.exports = class GitHubCommand extends Command {
constructor(client) {
@@ -32,7 +32,8 @@ module.exports = class GitHubCommand extends Command {
async run(msg, { author, repository }) {
try {
const { body } = await snekfetch.get(`https://${GITHUB_LOGIN}@api.github.com/repos/${author}/${repository}`);
const { body } = await snekfetch
.get(`https://${GITHUB_USERNAME}:${GITHUB_PASSWORD}@api.github.com/repos/${author}/${repository}`);
const embed = new MessageEmbed()
.setColor(0xFFFFFF)
.setAuthor('GitHub', 'https://i.imgur.com/e4HunUm.png')