Skip to content

Commit

Permalink
create-discord-bot
Browse files Browse the repository at this point in the history
  • Loading branch information
artifishvr committed May 14, 2024
1 parent 9eb386e commit 1d42ea5
Show file tree
Hide file tree
Showing 18 changed files with 5,397 additions and 1,115 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Discord bot token with message content intents, from https://discord.com/developers/applications
DISCORD="TOKEN"
APPLICATION_ID=""

# Channels to talk to the AI in
CHANNELIDS="123456789012345678,123456789012345678"
Expand All @@ -8,4 +9,4 @@ REPLY_CHANCE=0.99

# For Workers AI
CF_ACCOUNT="ACCOUNT_ID"
CF_TOKEN=""
CF_TOKEN=""
10 changes: 10 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json.schemastore.org/eslintrc.json",
"root": true,
"extends": ["neon/common", "neon/node", "neon/prettier"],
"rules": {
"jsdoc/valid-types": 0,
"jsdoc/check-tag-names": 0,
"jsdoc/no-undefined-types": 0
}
}
3 changes: 1 addition & 2 deletions .github/workflows/deploy-image-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Deploy Beta Docker Image to GHCR
on:
push:
branches:
- beta
- staging
- v2
workflow_dispatch:

jobs:
Expand Down
9 changes: 9 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://json.schemastore.org/prettierrc.json",
"printWidth": 120,
"useTabs": true,
"singleQuote": true,
"quoteProps": "as-needed",
"trailingComma": "all",
"endOfLine": "lf"
}
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"tamasfe.even-better-toml",
"codezombiech.gitignore",
"christian-kohler.npm-intellisense",
"christian-kohler.path-intellisense"
]
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "never"
},
"editor.trimAutoWhitespace": false,
"files.insertFinalNewline": true,
"files.eol": "\n",
"npm.packageManager": "pnpm"
}
14 changes: 0 additions & 14 deletions Dockerfile

This file was deleted.

250 changes: 0 additions & 250 deletions index.js

This file was deleted.

49 changes: 24 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
{
"name": "spongegpt",
"version": "1.31.0",
"description": "custom AI chatbot for discord",
"main": "index.js",
"type": "module",
"scripts": {
"start": "node index.js",
"dev": "nodemon index.js"
},
"author": "artifish",
"license": "AGPL-3.0",
"dependencies": {
"@discordjs/voice": "^0.17.0",
"discord.js": "^14.15.2",
"dotenv": "^16.4.5",
"ffmpeg-static": "^5.2.0",
"libsodium-wrappers": "^0.7.13",
"luxon": "^3.4.4",
"msedge-tts": "^1.3.4",
"node-fetch": "^3.3.2"
},
"devDependencies": {
"nodemon": "^3.1.0"
}
}
"$schema": "https://json.schemastore.org/package.json",
"name": "SpongeChat",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"lint": "prettier --check . && eslint --ext .js,.mjs,.cjs --format=pretty src",
"format": "prettier --write . && eslint --ext .js,.mjs,.cjs --fix --format=pretty src",
"start": "node --require dotenv/config src/index.js",
"deploy": "node --require dotenv/config src/util/deploy.js"
},
"dependencies": {
"@discordjs/core": "^1.2.0",
"discord.js": "^14.15.0",
"dotenv": "^16.3.1"
},
"devDependencies": {
"eslint": "^8.53.0",
"eslint-config-neon": "^0.1.57",
"eslint-formatter-pretty": "^5.0.0",
"prettier": "^3.1.0",
"zod": "^3.22.4"
}
}
Loading

0 comments on commit 1d42ea5

Please sign in to comment.