Skip to content

Commit 4cf3ecb

Browse files
author
fsupulchowk
committed
feat: Remove nuke command functionality and Enhance the neccessary code
1 parent 22bc27e commit 4cf3ecb

File tree

11 files changed

+1101
-502
lines changed

11 files changed

+1101
-502
lines changed
Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
11
name: Docker Image CI
2-
32
on:
43
push:
54
branches:
6-
- main # This workflow runs on pushes to the 'main' branch
7-
5+
- main
86
env:
9-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} # Your Docker Hub username
10-
IMAGE_NAME: fsu-discord-bot # Name for your Docker image (e.g., your-repo-name)
11-
7+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
8+
IMAGE_NAME: fsu-discord-bot
129
jobs:
1310
build-and-push-docker-image:
14-
runs-on: ubuntu-latest # Use the latest Ubuntu runner
15-
11+
runs-on: ubuntu-latest
1612
steps:
1713
- name: Checkout Repository
18-
uses: actions/checkout@v4 # Action to check out your repository code
19-
14+
uses: actions/checkout@v4
2015
- name: Log in to Docker Hub
21-
uses: docker/login-action@v3 # Action to log in to Docker Hub
16+
uses: docker/login-action@v3
2217
with:
2318
username: ${{ env.DOCKER_USERNAME }}
24-
password: ${{ secrets.DOCKER_PASSWORD }} # Use a GitHub Secret for your Docker Hub password
25-
19+
password: ${{ secrets.DOCKER_PASSWORD }}
2620
- name: Build and Push Docker Image
27-
uses: docker/build-push-action@v5 # Action to build and push Docker images
21+
uses: docker/build-push-action@v5
2822
with:
29-
context: . # Build context is the root of the repository
30-
push: true # Push the image to Docker Hub
31-
tags: | # Define image tags
23+
context: .
24+
push: true
25+
tags: |
3226
${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest
3327
${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:${{ github.sha }}

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ RUN chown -R botuser:botuser /app
88
RUN apt-get update && \
99
apt-get install -y --no-install-recommends \
1010
wget \
11+
curl \
1112
ca-certificates \
1213
fonts-liberation \
1314
libappindicator3-1 \

README.md

Lines changed: 359 additions & 223 deletions
Large diffs are not rendered by default.

src/bot.js

Lines changed: 165 additions & 56 deletions
Large diffs are not rendered by default.

src/commands/slash/addTask.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ export const data = new SlashCommandBuilder()
77
option.setName('description')
88
.setDescription('The description of the task')
99
.setRequired(true))
10-
.setDefaultMemberPermissions(PermissionsBitField.Flags.Administrator);
10+
.setDefaultMemberPermissions(PermissionsBitField.Flags.KickMembers);
1111

1212
export async function execute(interaction) {
1313
if (!interaction.guild) {
1414
return interaction.reply({ content: 'This command can only be used in a server.', ephemeral: true });
1515
}
1616

17-
if (!interaction.member.permissions.has(PermissionsBitField.Flags.Administrator)) {
17+
if (!interaction.member.permissions.has(PermissionsBitField.Flags.KickMembers)) {
1818
return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true });
1919
}
2020

src/commands/slash/listTasks.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ export const data = new SlashCommandBuilder()
1313
{ name: 'In-Progress', value: 'in-progress' },
1414
{ name: 'All', value: 'all' }
1515
))
16-
.setDefaultMemberPermissions(PermissionsBitField.Flags.Administrator); // Requires Administrator permission
16+
.setDefaultMemberPermissions(PermissionsBitField.Flags.KickMembers);
1717

1818
export async function execute(interaction) {
1919
if (!interaction.guild) {
2020
return interaction.reply({ content: 'This command can only be used in a server.', ephemeral: true });
2121
}
2222

23-
if (!interaction.member.permissions.has(PermissionsBitField.Flags.Administrator)) {
23+
if (!interaction.member.permissions.has(PermissionsBitField.Flags.KickMembers)) {
2424
return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true });
2525
}
2626

@@ -93,6 +93,6 @@ export async function execute(interaction) {
9393
}
9494
embed.setDescription(taskDescriptions.join('\n\n'));
9595
}
96-
interaction.reply({ embeds: [embed] }); // Can be ephemeral or public
96+
interaction.reply({ embeds: [embed] });
9797
});
9898
}

src/commands/slash/nuke.js

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)