mirror of
https://github.com/gabrielkheisa/discord-active-developer-badge.git
synced 2025-09-13 06:41:10 +00:00
Compare commits
1 Commits
0725c48088
...
dev
Author | SHA1 | Date | |
---|---|---|---|
|
a5234c7904 |
19
.github/workflows/main.yml
vendored
19
.github/workflows/main.yml
vendored
@@ -1,23 +1,20 @@
|
||||
name: Build and Publish Docker Image
|
||||
name: Docker Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main # Trigger the workflow on pushes to the main branch
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Login to GitHub Packages Docker registry
|
||||
run: echo "${{ secrets.GH_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.repository_owner }} --password-stdin
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t docker.pkg.github.com/${{ github.repository }}/discord-badge:latest .
|
||||
|
||||
- name: Push Docker image
|
||||
run: docker push docker.pkg.github.com/${{ github.repository }}/discord-badge:latest
|
||||
run: docker build -t discord-badge .
|
14
README.md
14
README.md
@@ -46,19 +46,7 @@ docker build -t discord-badge .
|
||||
```
|
||||
3. Run the container and insert your Discord bot token
|
||||
```bash
|
||||
docker run -d -e TOKEN=<your_bot_token> discord-badge
|
||||
```
|
||||
4. Jump directly to step 12 and follow the remaining steps from the main instruction
|
||||
|
||||
### With pre-built Docker Image
|
||||
1. Follow step 1 to 4 from the main instruction above
|
||||
2. Pull the Docker image
|
||||
```bash
|
||||
docker pull ghcr.io/gabrielkheisa/discord-active-developer-badge/discord-badge:latest
|
||||
```
|
||||
3. Run the container and insert your Discord bot token
|
||||
```bash
|
||||
docker run -d -e TOKEN=<your_bot_token> ghcr.io/gabrielkheisa/discord-active-developer-badge/discord-badge:latest
|
||||
docker run -it discord-badge
|
||||
```
|
||||
4. Jump directly to step 12 and follow the remaining steps from the main instruction
|
||||
|
||||
|
2
index.js
2
index.js
@@ -34,7 +34,7 @@ client.on('interactionCreate', (interaction) => {
|
||||
|
||||
const question = (q) => new Promise((resolve) => rl.question(q, resolve));
|
||||
(async ()=>{
|
||||
const token = process.env.TOKEN;
|
||||
const token = await question('Application token? ');
|
||||
if(!token) throw new Error('Invalid token');
|
||||
|
||||
const ratelimitTest = await fetch(`https://discord.com/api/v9/invites/discord-developers`);
|
||||
|
Reference in New Issue
Block a user