Pinned Repositories
AlbyBenlocal
Config files for my GitHub profile.
spsiteweb
site web officiel
vinted-discord-bot
🔔 BOT Discord qui envoie un message quand un nouvel article est publié sur Vinted (selon certains critères)
Work-command-en-Javascript-
const db = require('quick.db') const Discord = require('discord.js') const ms = require("parse-ms"); module.exports.run = async (bot, message, args) => { if(!message.content.startsWith('e!'))return; let user = message.author; let author = await db.fetch(`work_${message.guild.id}_${user.id}`) let timeout = 600000; if (author !== null && timeout - (Date.now() - author) > 0) { let time = ms(timeout - (Date.now() - author)); let timeEmbed = new Discord.RichEmbed() .setColor("#FFFFFF") .setDescription(` You have already worked recentlynnTry again in ${time.minutes}m ${time.seconds}s `); message.channel.send(timeEmbed) } else { let replies = ['Programmer','Builder','Waiter','Busboy','Chief','Mechanic'] let result = Math.floor((Math.random() * replies.length)); let amount = Math.floor(Math.random() * 80) + 1; let embed1 = new Discord.RichEmbed() .setColor("#FFFFFF") .setDescription(`<a:check:741676531029508216> You worked as a ${replies[result]} and earned ${amount} coins`); message.channel.send(embed1) db.add(`money_${message.guild.id}_${user.id}`, amount) db.set(`work_${message.guild.id}_${user.id}`, Date.now()) }; } module.exports.help = { name:"work", aliases: ["wr"] }
AlbyBenlocal's Repositories
AlbyBenlocal/AlbyBenlocal
Config files for my GitHub profile.
AlbyBenlocal/spsiteweb
site web officiel
AlbyBenlocal/vinted-discord-bot
🔔 BOT Discord qui envoie un message quand un nouvel article est publié sur Vinted (selon certains critères)
AlbyBenlocal/Work-command-en-Javascript-
const db = require('quick.db') const Discord = require('discord.js') const ms = require("parse-ms"); module.exports.run = async (bot, message, args) => { if(!message.content.startsWith('e!'))return; let user = message.author; let author = await db.fetch(`work_${message.guild.id}_${user.id}`) let timeout = 600000; if (author !== null && timeout - (Date.now() - author) > 0) { let time = ms(timeout - (Date.now() - author)); let timeEmbed = new Discord.RichEmbed() .setColor("#FFFFFF") .setDescription(` You have already worked recentlynnTry again in ${time.minutes}m ${time.seconds}s `); message.channel.send(timeEmbed) } else { let replies = ['Programmer','Builder','Waiter','Busboy','Chief','Mechanic'] let result = Math.floor((Math.random() * replies.length)); let amount = Math.floor(Math.random() * 80) + 1; let embed1 = new Discord.RichEmbed() .setColor("#FFFFFF") .setDescription(`<a:check:741676531029508216> You worked as a ${replies[result]} and earned ${amount} coins`); message.channel.send(embed1) db.add(`money_${message.guild.id}_${user.id}`, amount) db.set(`work_${message.guild.id}_${user.id}`, Date.now()) }; } module.exports.help = { name:"work", aliases: ["wr"] }