Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Commit

Permalink
Fix comandi
Browse files Browse the repository at this point in the history
  • Loading branch information
giovd8 committed Apr 25, 2020
1 parent 142dfc2 commit ff4bd2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion commands/login.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require("dotenv").config();
const botLogin = (bot, axios) => {
const axios = require("axios");

const botLogin = (bot) => {
bot.command("login", (message) => {
const username = message.from.username;
const chatId = message.from.id;
Expand Down
7 changes: 4 additions & 3 deletions commands/status.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
require("dotenv").config();
const botStatus = (bot, axios) => {
const axios = require("axios");

const botStatus = (bot) => {
bot.command("status", (message) => {
const username = message.from.username;
console.log(username);
axios
.get(`${process.env.LINK_API}/users?telegramName=` + username)
.get(`${process.env.URL_API}/users?telegramName=${username}`)
.then((res) => {
const data = res.data[0];
const name = data.name;
Expand Down

0 comments on commit ff4bd2a

Please sign in to comment.