[READ-ONLY] Mirror of https://github.com/maybeanerd/MagiBot. MagiBot - the community building discord bot that adds joinsounds to your voice channels! discord.gg/2Evcf4T
bot bots community discord gaming hacktoberfest sound
1

Configure Feed

Select the types of activity you want to include in your feed.

feat: prepare for new deployment (#1625)

authored by

Sebastian Di Luzio and committed by
GitHub
(Apr 3, 2026, 10:03 PM +0200) dc22c635 543ef314

+48 -221
-11
.github/dependabot.yml
··· 1 - # To get started with Dependabot version updates, you'll need to specify which 2 - # package ecosystems to update and where the package manifests are located. 3 - # Please see the documentation for all configuration options: 4 - # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 - 6 - version: 2 7 - updates: 8 - - package-ecosystem: "npm" # See documentation for possible values 9 - directory: "/" # Location of package manifests 10 - schedule: 11 - interval: "daily"
+44
.github/workflows/docker-image.yml
··· 1 + name: build & push docker container 2 + on: 3 + push: 4 + tags: 5 + - "*" 6 + pull_request: 7 + branches: 8 + - main 9 + jobs: 10 + docker: 11 + runs-on: ubuntu-latest 12 + permissions: 13 + contents: read 14 + packages: write 15 + steps: 16 + - name: Checkout 17 + uses: actions/checkout@v6 18 + - name: Docker meta 19 + id: metadata 20 + uses: docker/metadata-action@v6 21 + with: 22 + images: | 23 + ghcr.io/${{ github.repository }} 24 + - name: Set up QEMU 25 + uses: docker/setup-qemu-action@v4 26 + - name: Set up Docker Buildx 27 + uses: docker/setup-buildx-action@v4 28 + - name: Login to GitHub Container Registry 29 + if: github.event_name != 'pull_request' 30 + uses: docker/login-action@v4 31 + with: 32 + registry: ghcr.io 33 + username: ${{ github.actor }} 34 + password: ${{ github.token }} 35 + - name: Build and push 36 + uses: docker/build-push-action@v7 37 + with: 38 + context: . 39 + platforms: linux/amd64,linux/arm64 40 + push: ${{ github.event_name != 'pull_request' }} 41 + tags: ${{ steps.metadata.outputs.tags }} 42 + labels: ${{ steps.metadata.outputs.labels }} 43 + cache-from: type=gha 44 + cache-to: type=gha,mode=max
-18
.github/workflows/pr.yml
··· 1 - name: Pull request 2 - on: 3 - pull_request: 4 - branches: 5 - - '**' 6 - 7 - jobs: 8 - build_container: 9 - runs-on: ubuntu-latest 10 - 11 - steps: 12 - - name: Checkout 13 - uses: actions/checkout@v6 14 - - name: Create Image Name 15 - run: | 16 - echo "IMAGE_NAME=ghcr.io/${GITHUB_REPOSITORY@L}-pr" >> $GITHUB_ENV 17 - - name: Build containers 18 - run: docker compose build
-88
.github/workflows/release.dev.yml
··· 1 - name: Release to dev 2 - 3 - on: 4 - push: 5 - branches: 6 - - main 7 - 8 - jobs: 9 - container: 10 - runs-on: ubuntu-latest 11 - 12 - environment: dev 13 - 14 - permissions: 15 - contents: read 16 - packages: write 17 - 18 - env: 19 - REGISTRY: ghcr.io 20 - ENVIRONMENT: ${{ secrets.ENVIRONMENT }} 21 - PROJECT_NAME: magibot-${{ secrets.ENVIRONMENT }} 22 - 23 - steps: 24 - - name: Checkout 25 - uses: actions/checkout@v6 26 - 27 - - name: Create Image Name 28 - run: | 29 - echo "IMAGE_NAME=ghcr.io/${GITHUB_REPOSITORY@L}-${{ secrets.ENVIRONMENT }}" >> $GITHUB_ENV 30 - 31 - - name: Build containers 32 - run: docker compose --project-name ${{ env.PROJECT_NAME }} build 33 - 34 - - name: Log in to the Container registry 35 - uses: docker/login-action@v3 36 - with: 37 - registry: ${{ env.REGISTRY }} 38 - username: ${{ github.actor }} 39 - password: ${{ secrets.GITHUB_TOKEN }} 40 - 41 - - name: Extract metadata for Docker 42 - id: meta 43 - uses: docker/metadata-action@v6 44 - with: 45 - images: ${{ env.IMAGE_NAME }} 46 - 47 - - name: Push Docker image 48 - run: docker push ${{ env.IMAGE_NAME }} 49 - 50 - - name: Install SSH Key 51 - uses: shimataro/ssh-key-action@v2 52 - with: 53 - key: ${{ secrets.SSH_PRIVATE_KEY }} 54 - known_hosts: 'just-a-placeholder-so-we-dont-get-errors' 55 - 56 - - name: Add Known Hosts 57 - run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts 58 - 59 - - name: Prune Leftover Docker Artifacts 60 - run: docker system prune -af 61 - env: 62 - # To execute it on remote swarm 63 - DOCKER_HOST: ssh://${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 64 - 65 - - name: Deploy stack 66 - run: docker stack deploy --compose-file docker-compose.yml ${{ env.PROJECT_NAME }} 67 - env: 68 - # To execute it on remote swarm 69 - DOCKER_HOST: ssh://${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 70 - # Env vars required to run the stack 71 - TOKEN: ${{ secrets.TOKEN }} 72 - OWNERID: ${{ secrets.OWNERID }} 73 - DATABASE_URL: ${{ secrets.DATABASE_URL }} 74 - STATCORD_TOKEN: ${{ secrets.STATCORD_TOKEN }} 75 - APP_ID: ${{ secrets.APP_ID }} 76 - 77 - # PostHog analytics 78 - POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} 79 - 80 - # discord webhook tokens 81 - WEBHOOK_ID_EX: ${{ secrets.WEBHOOK_ID_EX }} 82 - WEBHOOK_TOKEN_EX: ${{ secrets.WEBHOOK_TOKEN_EX }} 83 - WEBHOOK_ID_JOIN: ${{ secrets.WEBHOOK_ID_JOIN }} 84 - WEBHOOK_TOKEN_JOIN: ${{ secrets.WEBHOOK_TOKEN_JOIN }} 85 - WEBHOOK_ID_BUG: ${{ secrets.WEBHOOK_ID_BUG }} 86 - WEBHOOK_TOKEN_BUG: ${{ secrets.WEBHOOK_TOKEN_BUG }} 87 - WEBHOOK_ID_STARTUP: ${{ secrets.WEBHOOK_ID_STARTUP }} 88 - WEBHOOK_TOKEN_STARTUP: ${{ secrets.WEBHOOK_TOKEN_STARTUP }}
-87
.github/workflows/release.prod.yml
··· 1 - name: Release to production 2 - 3 - on: 4 - release: 5 - types: [published] 6 - 7 - jobs: 8 - container: 9 - runs-on: ubuntu-latest 10 - 11 - environment: prod 12 - 13 - permissions: 14 - contents: read 15 - packages: write 16 - 17 - env: 18 - REGISTRY: ghcr.io 19 - ENVIRONMENT: ${{ secrets.ENVIRONMENT }} 20 - PROJECT_NAME: magibot-${{ secrets.ENVIRONMENT }} 21 - 22 - steps: 23 - - name: Checkout 24 - uses: actions/checkout@v6 25 - 26 - - name: Create Image Name 27 - run: | 28 - echo "IMAGE_NAME=ghcr.io/${GITHUB_REPOSITORY@L}-${{ secrets.ENVIRONMENT }}" >> $GITHUB_ENV 29 - 30 - - name: Build containers 31 - run: docker compose --project-name ${{ env.PROJECT_NAME }} build 32 - 33 - - name: Log in to the Container registry 34 - uses: docker/login-action@v3 35 - with: 36 - registry: ${{ env.REGISTRY }} 37 - username: ${{ github.actor }} 38 - password: ${{ secrets.GITHUB_TOKEN }} 39 - 40 - - name: Extract metadata for Docker 41 - id: meta 42 - uses: docker/metadata-action@v6 43 - with: 44 - images: ${{ env.IMAGE_NAME }} 45 - 46 - - name: Push Docker image 47 - run: docker push ${{ env.IMAGE_NAME }} 48 - 49 - - name: Install SSH Key 50 - uses: shimataro/ssh-key-action@v2 51 - with: 52 - key: ${{ secrets.SSH_PRIVATE_KEY }} 53 - known_hosts: 'just-a-placeholder-so-we-dont-get-errors' 54 - 55 - - name: Add Known Hosts 56 - run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts 57 - 58 - - name: Prune Leftover Docker Artifacts 59 - run: docker system prune -af 60 - env: 61 - # To execute it on remote swarm 62 - DOCKER_HOST: ssh://${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 63 - 64 - - name: Deploy stack 65 - run: docker stack deploy --compose-file docker-compose.yml ${{ env.PROJECT_NAME }} 66 - env: 67 - # To execute it on remote swarm 68 - DOCKER_HOST: ssh://${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 69 - # Env vars required to run the stack 70 - TOKEN: ${{ secrets.TOKEN }} 71 - OWNERID: ${{ secrets.OWNERID }} 72 - DATABASE_URL: ${{ secrets.DATABASE_URL }} 73 - STATCORD_TOKEN: ${{ secrets.STATCORD_TOKEN }} 74 - APP_ID: ${{ secrets.APP_ID }} 75 - 76 - # PostHog analytics 77 - POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} 78 - 79 - # discord webhook tokens 80 - WEBHOOK_ID_EX: ${{ secrets.WEBHOOK_ID_EX }} 81 - WEBHOOK_TOKEN_EX: ${{ secrets.WEBHOOK_TOKEN_EX }} 82 - WEBHOOK_ID_JOIN: ${{ secrets.WEBHOOK_ID_JOIN }} 83 - WEBHOOK_TOKEN_JOIN: ${{ secrets.WEBHOOK_TOKEN_JOIN }} 84 - WEBHOOK_ID_BUG: ${{ secrets.WEBHOOK_ID_BUG }} 85 - WEBHOOK_TOKEN_BUG: ${{ secrets.WEBHOOK_TOKEN_BUG }} 86 - WEBHOOK_ID_STARTUP: ${{ secrets.WEBHOOK_ID_STARTUP }} 87 - WEBHOOK_TOKEN_STARTUP: ${{ secrets.WEBHOOK_TOKEN_STARTUP }}
-1
Procfile
··· 1 - worker: npm run start
+2 -3
docker-compose.yml
··· 1 - version: '3.9' 1 + version: "3.9" 2 2 services: 3 3 main: 4 4 build: . 5 - image: ${IMAGE_NAME} 5 + image: magibot 6 6 volumes: 7 7 - joinsounds:/app/joinsounds 8 8 environment: 9 9 - TOKEN=${TOKEN} 10 10 - OWNERID=${OWNERID} 11 11 - DATABASE_URL=${DATABASE_URL} 12 - - STATCORD_TOKEN=${STATCORD_TOKEN} 13 12 - APP_ID=${APP_ID} 14 13 15 14 # PostHog analytics
+1 -2
package.json
··· 67 67 "bugs": { 68 68 "url": "https://github.com/maybeanerd/MagiBot/issues" 69 69 }, 70 - "homepage": "https://github.com/maybeanerd/MagiBot#readme", 71 - "heroku-run-build-script": true 70 + "homepage": "https://github.com/maybeanerd/MagiBot#readme" 72 71 }
+1 -2
rename-me.env
··· 1 1 TOKEN=abcdef 2 2 OWNERID=12345 3 3 DATABASE_URL=someURL 4 - STATCORD_TOKEN=statcord.com-token 5 4 6 5 # webhook tokens 7 6 WEBHOOK_ID_EX= ··· 14 13 WEBHOOK_TOKEN_STARTUP= 15 14 16 15 # posthog tokens 17 - POSTHOG_API_KEY= 16 + POSTHOG_API_KEY=
-9
src/index.ts
··· 13 13 token: TOKEN, 14 14 }); 15 15 16 - if (!process.env.STATCORD_TOKEN) { 17 - throw new Error('Statcord token missing!'); 18 - } 19 - 20 - /* export const statcord = new Statcord.ShardingClient({ 21 - manager, 22 - key: process.env.STATCORD_TOKEN, 23 - }); */ 24 - 25 16 // register custom stats 26 17 // statcord.registerCustomFieldHandler(1, accumulateJoinsoundsPlayed); 27 18 // statcord.registerCustomFieldHandler(2, accumulateUsersJoinedQueue);