Skip to content

Instantly share code, notes, and snippets.

View highfeed's full-sized avatar
🎯
Focusing

Oleg Oskolsky highfeed

🎯
Focusing
View GitHub Profile
const generatePaginationKeyboard = (current, count, prefix) => {
let keyboard = []
if (count <= 5) {
return Array.from({ length: count }, (_, index) => index + 1).map((index) => {
const text = current + 1 === index ? `· ${index} ·` : `${index}`
return Markup.callbackButton(text, `${prefix}${index - 1}`)
})
}
{
"@type": "config.global",
"dht": {
"@type": "dht.config.global",
"a": 3,
"k": 6,
"static_nodes": {
"@type": "dht.nodes",
"nodes": [
{
const {getMentionUserString} = require('../functions/utils')
const gamesRates = {
'roll-dice-even-odd': 3000,
'roll-dice-three': 3000,
'spin-slot-machine-four': 1800,
}
const RATE_LIMITS = {}
@highfeed
highfeed / dice.js
Created December 18, 2020 14:34
Dice model
const mongoose = require('mongoose')
const {Schema} = mongoose
const Dice = new Schema({
type: Number,
transaction_id: mongoose.ObjectId,
owner_id: Number,