Skip to content

debemenitammy/discord-command-bot

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

πŸ€– Node.js Discord Command Bot Function

Simple command using Discord Interactions.

🧰 Usage

POST /interactions

Webhook to receive Discord command events. To receive events, you must register your application as a Discord bot.

Parameters

Name Description Location Type Sample Value
x-signature-ed25519 Signature of the request payload Header string d1efb...aec35
x-signature-timestamp Timestamp of the request payload Header string 1629837700
JSON Body GitHub webhook payload Body Object See Discord docs

Response

Sample 200 Response:

Returns a Discord message object.

{
  "type": 4,
  "data": {
    "content": "Hello from Appwrite πŸ‘‹"
  }
}

Sample 401 Response:

{
  "error": "Invalid request signature"
}

βš™οΈ Configuration

Setting Value
Runtime Node (18.0)
Entrypoint src/main.js
Build Commands npm install
Permissions any
Timeout (Seconds) 15

πŸ”’ Environment Variables

DISCORD_PUBLIC_KEY

Public Key of your application in Discord Developer Portal.

Question Answer
Required Yes
Sample Value db9...980
Documentation Discord Docs

DISCORD_APPLICATION_ID

ID of your application in Discord Developer Portal.

Question Answer
Required Yes
Sample Value 427...169
Documentation Discord Docs

DISCORD_TOKEN

Bot token of your application in Discord Developer Portal.

Question Answer
Required Yes
Sample Value NDI...LUfg
Documentation Discord Docs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published