From 76174a213319ca079c80de16f094df55408d319f Mon Sep 17 00:00:00 2001 From: Malachi Date: Sat, 17 Apr 2021 14:24:09 -0600 Subject: [PATCH] dm user --- commands/util/help.js | 28 ++++++++++++++++++---------- package.json | 2 +- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/commands/util/help.js b/commands/util/help.js index 6397860..fbfd756 100644 --- a/commands/util/help.js +++ b/commands/util/help.js @@ -83,16 +83,24 @@ module.exports = class Help extends Command { await fields.push({ name: `**__${group.name}__**`, value: cmdList }) }) - await message.embed({ - title: `Mars Bot Help (Prefix: \`${message.guild.commandPrefix}\`)`, - url: 'https://github.com/mebrooks01/Mars-Bot/blob/main/README.md', - description: - "**Key**:\n⚠️ Guild Only\nArgument names enclosed in `[square brackets]` are optional. Ones enclosed in `` are required. Ones enclosed in `['single quotes']` mean that you should type their name to toggle an option (instead of providing a value of your own). Ones separated by `` mean you can choose between one of them (this also applies to quoted arguments).\nPS Thx catte for the arguments explanation", - fields, - color: config.embed_color, - timestamp: new Date(), - thumbnail: { url: config.pfp } - }) + try { + await message.author.send({ + embed: { + title: `Mars Bot Help (Prefix: \`${message.guild.commandPrefix}\`)`, + url: 'https://github.com/mebrooks01/Mars-Bot/blob/main/README.md', + description: + "**Key**:\n⚠️ Guild Only\nArgument names enclosed in `[square brackets]` are optional. Ones enclosed in `` are required. Ones enclosed in `['single quotes']` mean that you should type their name to toggle an option (instead of providing a value of your own). Ones separated by `` mean you can choose between one of them (this also applies to quoted arguments).\nPS Thx catte for the arguments explanation", + fields, + color: config.embed_color, + timestamp: new Date(), + thumbnail: { url: config.pfp } + } + }) + await message.react('✅') + } catch (error) { + await message.reply('Could not send a DM to you\nYou probably have DMs off') + await message.react('❌') + } fields = [] } } diff --git a/package.json b/package.json index 1301eb6..4330de1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mars-bot", - "version": "2.1.4", + "version": "2.1.5", "description": "Using NASA's API it send mars related stuff via commands.", "main": "index.js", "scripts": {},