Skip to content

Commit

Permalink
Update About.ts
Browse files Browse the repository at this point in the history
Using client ID from .env instead of copy-paste bot ID manually 

Signed-off-by: Ayeen... <[email protected]>
  • Loading branch information
UnpoeticNad authored Mar 15, 2024
1 parent dc28ac2 commit 4d73ed6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/commands/info/About.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { ActionRowBuilder, ButtonBuilder, ButtonStyle } from 'discord.js';
import dotenv from 'dotenv'; // Import dotenv

dotenv.config(); // Load environment variables

import { Command, Context, Lavamusic } from '../../structures/index.js';

Expand Down Expand Up @@ -31,12 +34,14 @@ export default class About extends Command {
});
}
public async run(client: Lavamusic, ctx: Context): Promise<any> {
const clientId = process.env.CLIENT_ID; // Retrieve client ID from environment variables

const row = new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setLabel('Invite Lavamusic')
.setStyle(ButtonStyle.Link)
.setURL(
`https://discord.com/api/oauth2/authorize?client_id=875635121770889257&permissions=8&scope=bot%20applications.commands`
`https://discord.com/api/oauth2/authorize?client_id=${clientId}&permissions=8&scope=bot%20applications.commands`
),
new ButtonBuilder()
.setLabel('Support Server')
Expand Down Expand Up @@ -84,6 +89,7 @@ export default class About extends Command {
});
}
}


/**
* Project: lavamusic
Expand Down

0 comments on commit 4d73ed6

Please sign in to comment.