From be99dfdf1266042e38474d9855e784abab3de683 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Sat, 5 Feb 2022 17:32:37 -0700 Subject: [PATCH] n?streak --- commands/leveling/streak.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 commands/leveling/streak.js diff --git a/commands/leveling/streak.js b/commands/leveling/streak.js new file mode 100644 index 0000000..6af74f6 --- /dev/null +++ b/commands/leveling/streak.js @@ -0,0 +1,26 @@ +const Discord = require('discord.js'); + +const Monners = require("../../models/monners"); + +module.exports = { + name: "streak", + aliases: [], + meta: { + category: 'Leveling', + description: "View yours or someone else's daily streak.", + syntax: '`streak [@user]`', + extra: null + }, + help: "View your streak, or mention someone else to view theirs.", + async execute(message, msg, args, cmd, prefix, mention, client) { + const tm = await Monners.findOne({uid: mention ? mention.id : message.author.id}); + return message.channel.send(tm ? {embeds: [ + new Discord.MessageEmbed() + .setAuthor({name: "Daily Streak", iconURL: mention ? mention.avatarURL() : message.author.avatarURL()}) + .setDescription(`${mention ? "That user's" : "Your"} streak is **${tm.daily.streak}**.`) + .setFooter({text: "Natsuki"}) + .setColor("c375f0") + .setTimestamp() + ]} : `${mention ? "That user doesn't" : "You don't"} have a streak yet!`); + } +}; \ No newline at end of file