diff --git a/src/commands/fun/love.ts b/src/commands/fun/love.ts index 936b51d..4c0c037 100644 --- a/src/commands/fun/love.ts +++ b/src/commands/fun/love.ts @@ -5,6 +5,7 @@ export default new NamedCommand({ channelType: CHANNEL_TYPE.GUILD, async run({send, guild}) { const member = guild!.members.cache.random(); - send(`I love ${member.nickname ?? member.user.username}!`); + if (!member) return send("For some reason, an error occurred fetching a member."); + return send(`I love ${member.nickname ?? member.user.username}!`); } }); diff --git a/src/commands/fun/modules/eco-core.ts b/src/commands/fun/modules/eco-core.ts index 841b736..7f7e3c4 100644 --- a/src/commands/fun/modules/eco-core.ts +++ b/src/commands/fun/modules/eco-core.ts @@ -1,3 +1,4 @@ +import {TextChannel} from "discord.js"; import {Command, getUserByNickname, NamedCommand, confirm, RestCommand} from "onion-lasers"; import {pluralise} from "../../../lib"; import {Storage} from "../../../structures"; @@ -20,7 +21,13 @@ export const DailyCommand = new NamedCommand({ { title: "Daily Reward", description: "You received 1 Mon!", - color: ECO_EMBED_COLOR + color: ECO_EMBED_COLOR, + fields: [ + { + name: "New balance:", + value: pluralise(user.money, "Mon", "s") + } + ] } ] }); @@ -29,10 +36,9 @@ export const DailyCommand = new NamedCommand({ embeds: [ { title: "Daily Reward", - description: `It's too soon to pick up your daily Mons. You have about ${( - (user.lastReceived + 79200000 - now) / - 3600000 - ).toFixed(1)} hours to go.`, + description: `It's too soon to pick up your daily Mons. Try again at .`, color: ECO_EMBED_COLOR } ] diff --git a/src/commands/fun/modules/eco-utils.ts b/src/commands/fun/modules/eco-utils.ts index 53bc7f4..c4eb24d 100644 --- a/src/commands/fun/modules/eco-utils.ts +++ b/src/commands/fun/modules/eco-utils.ts @@ -62,9 +62,17 @@ export function getSendEmbed(sender: User, receiver: User, amount: number): obje } export function isAuthorized(guild: Guild | null, channel: TextBasedChannels): boolean { - if ((guild?.id === "637512823676600330" && channel?.id === "669464416420364288") || IS_DEV_MODE) return true; - else { - channel.send("Sorry, this command can only be used in Monika's emote server. (#mon-stocks)"); + if (IS_DEV_MODE) { + return true; + } + + if (guild?.id !== "637512823676600330") { + channel.send("Sorry, this command can only be used in Monika's emote server."); + return false; + } else if (channel?.id !== "669464416420364288") { + channel.send("Sorry, this command can only be used in <#669464416420364288>."); + return false; + } else { return false; } }