Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Vkozulya kakoy feature #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tynopet
Copy link
Member

@tynopet tynopet commented Apr 3, 2018

No description provided.

@tynopet tynopet requested a review from pashutk April 3, 2018 13:01
const getKakoy = (userId, date) => {
const normalizedDate = new Date(date.setHours(0, 0, 0, 0));
const seed = userId + Math.round(normalizedDate.getTime() / 1e7);
const random = new Random(seed).next();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ты каждый раз инициируешь новый инстанс рандома? Зачем?

});

bot.command("hist", ({ message, reply }) => {
const answer = Array(HISTORY_DAYS_COUNT)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Интересные отступы

"докладывающий",
"пиарящий",
"нативный",
"undefined",
Copy link

@PaulineNemchak PaulineNemchak Apr 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мб вместо undefined — is not defined
и ещё мб function is not a function

или просто undefined и null оставить

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants