Merge pull request #42 from EL20202/master

Minor modifications to the '.eco' command
This commit is contained in:
WatDuhHekBro 2021-06-23 00:07:44 -05:00 committed by GitHub
commit 2969dfd814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 4 deletions

View File

@ -19,7 +19,13 @@ export const DailyCommand = new NamedCommand({
embed: { embed: {
title: "Daily Reward", title: "Daily Reward",
description: "You received 1 Mon!", description: "You received 1 Mon!",
color: ECO_EMBED_COLOR color: ECO_EMBED_COLOR,
fields: [
{
name: "New balance:",
value: pluralise(user.money, "Mon", "s")
}
]
} }
}); });
} else } else

View File

@ -62,9 +62,17 @@ export function getSendEmbed(sender: User, receiver: User, amount: number): obje
} }
export function isAuthorized(guild: Guild | null, channel: TextChannel | DMChannel | NewsChannel): boolean { export function isAuthorized(guild: Guild | null, channel: TextChannel | DMChannel | NewsChannel): boolean {
if ((guild?.id === "637512823676600330" && channel?.id === "669464416420364288") || IS_DEV_MODE) return true; if (IS_DEV_MODE) {
else { return true;
channel.send("Sorry, this command can only be used in Monika's emote server. (#mon-stocks)"); }
if (guild?.id !== "637512823676600330") {
channel.send("Sorry, this command can only be used in Monika's emote server.");
return false; return false;
} else if (channel?.id === "669464416420364288") {
channel.send("Sorry, this command can only be used in <#669464416420364288>.");
return false;
} else {
return true;
} }
} }