Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update About.ts #520

Merged
merged 3 commits into from
Mar 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading