Skip to content

object-Object/modping

Repository files navigation

modping

Serverless Discord bot to ping moderators about a message

Deploying

Create a Discord bot in the developer portal with the following settings:

  • Installation:
    • Installation Contexts: Guild Install
    • Install Link: None
  • Bot:
    • Public Bot: No
    • Message Content Intent: Yes

To invite the bot to your server, go to the OAuth2 page and select the following options to generate an invite URL:

  • Scopes: bot, applications.commands
  • Integration Type: Guild Install

Create a file called .env with the following contents:

# Bot values from developer portal
BOT_ID="..."
BOT_PUBLIC_KEY="..."
BOT_TOKEN="..."

# Channel ID to send messages to
CHANNEL_ID="..."
# Server ID to allow the command to be used in
GUILD_ID="..."
# Role ID to ping in messages marked urgent
MOD_ROLE_ID="..."

Sync guild/global slash commands:

yarn sync guild --guildId ...
yarn sync all

Deploy the CDK stack for dev or prod:

aws configure sso
yarn deploy-dev
yarn deploy-prod

Paste the value of the FunctionUrl output into the Interactions Endpoint URL field in the developer portal.

About

Serverless Discord bot to ping moderators about a message

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Contributors