diff options
| author | Fuwn <[email protected]> | 2022-05-18 04:08:52 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-05-18 04:08:52 -0700 |
| commit | ebc72061fec75d44f41c776708275d9c323ca827 (patch) | |
| tree | 983dfda1c7de41cfcb6283a6f657e75fb771c729 /mod.ts | |
| parent | refactor: reimplement (diff) | |
| download | macy-main.tar.xz macy-main.zip | |
Diffstat (limited to 'mod.ts')
| -rw-r--r-- | mod.ts | 40 |
1 files changed, 13 insertions, 27 deletions
@@ -1,29 +1,15 @@ -import * as deploy from "https://deno.land/x/[email protected]/deploy.ts"; -import { FUWN_ID, LOBBY_CHANNEL } from "./config.ts"; +// This file is part of Macy <https://github.com/Fuwn/macy>. +// Copyright (C) 2022-2022 Fuwn <[email protected]> +// +// All Rights Reserved. +// +// Copyright (C) 2022-2022 Fuwn <[email protected]> +// SPDX-License-Identifier: UNLICENSED -deploy.init({ env: true }); +import { Macy } from "./macy.ts"; +import { config } from "https://deno.land/x/[email protected]/mod.ts"; +import { GatewayIntents } from "https://deno.land/x/[email protected]/mod.ts"; -if ((await deploy.commands.all()).size) { - deploy.commands.bulkEdit([ - { - name: "setup", - description: "Setup the informational message in the lobby channel.", - }, - ]); -} - -deploy.handle("setup", (_: deploy.ApplicationCommandInteraction) => { - deploy.client.client?.channels.sendMessage( - LOBBY_CHANNEL, - "To access the rest of the server, send a message structured like this: " + - "`/verify [name]`, with `name` being your full name as shown in Zoom." + - "\n\nAn example of a valid verification request looks like this: " + - "`/verify Zoltan Szabatin`.\n\nIf you are unable to verify yourself; " + - "first, check if your name is recognized as a class member using the " + - "`/check [name]` command, with `name` being your full name as show in " + - "Zoom. An example of a valid check command looks like: " + - "`/check Zoltan Szabatin`.\n\nIf you are unable to verify yourself and " + - "your name is not recognized as a class member, you should then DM " + - `<@${FUWN_ID}>.`, - ); -}); +(new Macy()).connect(config().TOKEN, [ + GatewayIntents.GUILD_MEMBERS, +]); |