vylbot-app/src/commands/501231711271780357/entry.ts
Vylpes 18e3f3d800
110 commandshelp about command errors which causes command to not run ()
* Change onMessage to onMessageCreate

* Fix help command
2022-04-15 16:12:46 +01:00

25 lines
No EOL
932 B
TypeScript

import { ICommandContext } from "../../contracts/ICommandContext";
import PublicEmbed from "../../helpers/embeds/PublicEmbed";
import SettingsHelper from "../../helpers/SettingsHelper";
import { Command } from "../../type/command";
export default class Entry extends Command {
constructor() {
super();
super.Category = "Moderation";
super.Roles = [
"moderator"
];
}
public override async execute(context: ICommandContext) {
if (!context.message.guild) return;
const rulesChannelId = await SettingsHelper.GetSetting("channels.rules", context.message.guild.id) || "rules";
const embedInfo = new PublicEmbed(context, "", `Welcome to the server! Please make sure to read the rules in the <#${rulesChannelId}> channel and type the code found there in here to proceed to the main part of the server.`);
embedInfo.SendToCurrentChannel();
}
}