Skip to content

Commit

Permalink
Create About.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
dawgcodes authored Apr 28, 2024
1 parent fe8a665 commit daf7b48
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions src/commands/imagine/About.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import {
ActionRowBuilder,
ButtonBuilder,
ButtonStyle,
CommandInteraction,
EmbedBuilder,
} from 'discord.js';

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

export default class About extends Command {
constructor(client: Bot) {
super(client, {
name: 'about',
nameLocalizations: {
fr: 'about',
},
description: {
content: '📨 | Shows information about the bot',
usage: 'about',
examples: ['about'],
},
descriptionLocalizations: {
fr: '📨 | Affiche des informations sur le bot',
},
category: 'general',
permissions: {
dev: false,
client: ['SendMessages', 'ViewChannel', 'EmbedLinks'],
user: [],
},
cooldown: 3,
options: [],
});
}
async run(client: Bot, interaction: CommandInteraction): Promise<void> {
const row = new ActionRowBuilder<ButtonBuilder>()
.addComponents(
new ButtonBuilder()
.setLabel('Invite midjourney')
.setURL(
`https://discord.com/oauth2/authorize?client_id=${client.user?.id}&scope=bot%20applications.commands&permissions=8`
)
.setStyle(ButtonStyle.Link)
)
.addComponents(
new ButtonBuilder()
.setLabel('Support Server')
.setURL('https://discord.gg/FMGaJcAET8')
.setStyle(ButtonStyle.Link)
);

const embed = new EmbedBuilder()
.setAuthor({
name: 'Midjourney',
iconURL: 'https://c.clc2l.com/t/M/i/Midjourney-96BXbL.png',
})
.setThumbnail('https://c.clc2l.com/t/M/i/Midjourney-96BXbL.png')
.addFields([
{
name: 'Creator',
value: '[LucasB25](https://github.com/dawgcodes)',
inline: true,
},
{
name: 'Repository',
value: '[Here](https://github.com/dawgcodes/Midjourney)',
inline: true,
},
{
name: 'Support',
value: '[Here](https://discord.gg/FMGaJcAET8)',
inline: true,
},
]);
await interaction.reply({ embeds: [embed], components: [row] });
}
}

0 comments on commit daf7b48

Please sign in to comment.