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

feat: support user installations #407

Merged
merged 7 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .env.vault
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#/--------------------------------------------------/

# development
DOTENV_VAULT_DEVELOPMENT="C0wMAXip45clNHJkkooSgcMJ7c7YkPNI0DYQMZWblNyEXP0lTObU4eYgOpPrDzMHgSPRUqH2b+k8O5Pm70DXMfkbh+tojcM4In5WH8gJIiepmYqU/O8XdocoGV2CPJO6rRTqhv1Z5Bb1ZM67ECc10SKDdzl7ZqugOL/1/oPeWjfNKz8AyaHsrz4w09F3rpZBviFsc2sYNdq7td0j/Hcr9F1SfS4nsl7r9Gz3zrTuhP05qZcLuI+nGGMLWssr68ZHMM6ax9FsNG96tnMpEDLabbaBDZeZVaAa/U25+jy2K5nS0tx6APHVHcYGcQuptWChepznFkDfCj4hHV+2AcYYpp4u0z282xf0nDARExFQwZSrfrcml049PU20g9h0Rbti3YiSGCoe8Qq2QKUG2LMWhMp94tk7/Im12IlvuRtY8eXVffIG56uCfbeKkXAiUZHg5sj+WeA="
DOTENV_VAULT_DEVELOPMENT="EXF9d40vF84eea0yfO/4Od2FgUuWLs0IkyulcISNqM3RUHe6i2iFHacnJwzrw8dgjtLVfhn+9MLq65ZQp3Vq1s2OifzOXlX0VgX6s1tHxI/lG8EHfdOqPuGHFbuFhwLM708mqHYuLBrgpZ/JaDezK5u/PVoDNPr+Q8wpJLnKBnz57ubTmPUVDCvlFz7JPEueknQ2Dl0RSOmTv5QA+LiRrAIriOCbdmXX3DA5UEgsTJaG7yzD76QBW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es: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div align="center">
<br />
<p>
<a href="https://discord.com/api/oauth2/authorize?client_id=702116355842768927&permissions=470150208&scope=applications.commands%20bot"><img src="https://raw.githubusercontent.com/h-projects/gasbot/main/.github/logo.png" alt="G.A.S Bot" width="128"/></a>
<a href="https://discord.com/api/oauth2/authorize?client_id=702116355842768927"><img src="https://raw.githubusercontent.com/h-projects/gasbot/main/.github/logo.png" alt="G.A.S Bot" width="128"/></a>
</p>
<p>
<a href="https://discord.gg/z2QsKF7ZJ6"><img src="https://img.shields.io/discord/720009823458033705?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
Expand Down
6 changes: 5 additions & 1 deletion src/classes/Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ export class Application<Ready extends boolean = boolean> extends Client<Ready>
}

async deployCommands() {
await this.application?.commands.set([
if (!this.isReady()) {
throw new Error("Client is not ready, can't deploy commands");
}

await this.application.commands.set([
...this.chatInputCommands.filter(c => !c.dev).map(c => c.slashCommandData.toJSON()),
...this.contextMenuCommands.filter(c => !c.dev).map(c => c.contextMenuCommandData.toJSON())
]);
Expand Down
11 changes: 9 additions & 2 deletions src/commands/changelog.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import type { Application } from '#classes';
import { changelog } from '#util';
import { type ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
import {
ApplicationIntegrationType,
type ChatInputCommandInteraction,
InteractionContextType,
SlashCommandBuilder
} from 'discord.js';

export function onSlashCommand(client: Application, interaction: ChatInputCommandInteraction) {
return interaction.reply({
Expand All @@ -20,4 +25,6 @@ export function onSlashCommand(client: Application, interaction: ChatInputComman

export const slashCommandData = new SlashCommandBuilder()
.setName('chanqeloq')
.setDescription('Check the latest features of the bot');
.setDescription('Check the latest features of the bot')
.setContexts([InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel])
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall]);
14 changes: 11 additions & 3 deletions src/commands/credits.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import type { Application } from '#classes';
import { env } from '#env';
import { fetchTags } from '#util';
import { type ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
import {
ApplicationIntegrationType,
type ChatInputCommandInteraction,
InteractionContextType,
SlashCommandBuilder
} from 'discord.js';

export async function onSlashCommand(client: Application, interaction: ChatInputCommandInteraction) {
const developers = await fetchTags(client, client.developers);
Expand All @@ -11,7 +17,7 @@ export async function onSlashCommand(client: Application, interaction: ChatInput
{
title: 'Credits',
fields: [
{ name: '<:VerifiedBotDev:764412852395180032> Developers', value: developers.join('\n'), inline: true },
{ name: `${env.EMOJI_BOT_DEV} Developers`, value: developers.join('\n'), inline: true },
{ name: '⭐ Special Thanks', value: specialThanksUsers.join('\n'), inline: true }
],
color: client.color
Expand All @@ -22,4 +28,6 @@ export async function onSlashCommand(client: Application, interaction: ChatInput

export const slashCommandData = new SlashCommandBuilder()
.setName('credits')
.setDescription('People who helped in the development');
.setDescription('People who helped in the development')
.setContexts([InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel])
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall]);
5 changes: 4 additions & 1 deletion src/commands/detector.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import type { Application } from '#classes';
import {
ActionRowBuilder,
ApplicationIntegrationType,
ButtonBuilder,
type ButtonInteraction,
ButtonStyle,
type ChatInputCommandInteraction,
InteractionContextType,
PermissionFlagsBits,
SlashCommandBuilder
} from 'discord.js';
Expand Down Expand Up @@ -91,8 +93,9 @@ export const hasComponent = true;
export const slashCommandData = new SlashCommandBuilder()
.setName('detector')
.setDescription('Manaqe the detection level')
.setContexts([InteractionContextType.Guild])
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages)
.setDMPermission(false)
.addStringOption(option =>
option.setName('level').setDescription('The new detection level').setRequired(false).addChoices(
{
Expand Down
8 changes: 6 additions & 2 deletions src/commands/g-spy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import type { Application } from '#classes';
import {
ActionRowBuilder,
ApplicationCommandType,
ApplicationIntegrationType,
ButtonBuilder,
type ButtonInteraction,
ButtonStyle,
type ChatInputCommandInteraction,
ContextMenuCommandBuilder,
InteractionContextType,
PermissionFlagsBits,
SlashCommandBuilder,
type UserContextMenuCommandInteraction
Expand Down Expand Up @@ -112,12 +114,14 @@ export const hasComponent = true;
export const slashCommandData = new SlashCommandBuilder()
.setName('g-spy')
.setDescription('Mark a user as a g-spy')
.setContexts([InteractionContextType.Guild])
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
.setDefaultMemberPermissions(PermissionFlagsBits.ManageRoles)
.setDMPermission(false)
.addUserOption(option => option.setName('user').setDescription('User to mark as g-spy').setRequired(true));

export const contextMenuCommandData = new ContextMenuCommandBuilder()
.setName('Mark as G Spy')
.setContexts([InteractionContextType.Guild])
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
.setDefaultMemberPermissions(PermissionFlagsBits.ManageRoles)
.setDMPermission(false)
.setType(ApplicationCommandType.User);
13 changes: 11 additions & 2 deletions src/commands/h.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import type { Application } from '#classes';
import { type ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
import {
ApplicationIntegrationType,
type ChatInputCommandInteraction,
InteractionContextType,
SlashCommandBuilder
} from 'discord.js';

export function onSlashCommand(client: Application, interaction: ChatInputCommandInteraction) {
return interaction.reply({
Expand All @@ -15,4 +20,8 @@ export function onSlashCommand(client: Application, interaction: ChatInputComman
});
}

export const slashCommandData = new SlashCommandBuilder().setName('h').setDescription('h');
export const slashCommandData = new SlashCommandBuilder()
.setName('h')
.setDescription('h')
.setContexts([InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel])
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall]);
11 changes: 9 additions & 2 deletions src/commands/hromomento.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import type { Application } from '#classes';
import { type ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
import {
ApplicationIntegrationType,
type ChatInputCommandInteraction,
InteractionContextType,
SlashCommandBuilder
} from 'discord.js';

export function onSlashCommand(client: Application, interaction: ChatInputCommandInteraction) {
return interaction.reply({
Expand All @@ -17,4 +22,6 @@ export function onSlashCommand(client: Application, interaction: ChatInputComman

export const slashCommandData = new SlashCommandBuilder()
.setName('hromomento')
.setDescription('aqui tenemos un qran bro momento');
.setDescription('aqui tenemos un qran bro momento')
.setContexts([InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel])
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall]);
13 changes: 11 additions & 2 deletions src/commands/huh.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import type { Application } from '#classes';
import { type ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
import {
ApplicationIntegrationType,
type ChatInputCommandInteraction,
InteractionContextType,
SlashCommandBuilder
} from 'discord.js';

export function onSlashCommand(client: Application, interaction: ChatInputCommandInteraction) {
return interaction.reply({
Expand All @@ -15,4 +20,8 @@ export function onSlashCommand(client: Application, interaction: ChatInputComman
});
}

export const slashCommandData = new SlashCommandBuilder().setName('huh').setDescription(':thinkinq_h:');
export const slashCommandData = new SlashCommandBuilder()
.setName('huh')
.setDescription(':thinkinq_h:')
.setContexts([InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel])
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall]);
27 changes: 18 additions & 9 deletions src/commands/info.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
import process from 'node:process';
import type { Application } from '#classes';
import { env } from '#env';
import { fetchTags } from '#util';
import dedent from 'dedent';
import { type ChatInputCommandInteraction, OAuth2Scopes, SlashCommandBuilder, version } from 'discord.js';
import {
ApplicationIntegrationType,
type ChatInputCommandInteraction,
DefaultRestOptions,
InteractionContextType,
Routes,
SlashCommandBuilder,
version
} from 'discord.js';
import metadata from '../../package.json' with { type: 'json' };

export async function onSlashCommand(client: Application<true>, interaction: ChatInputCommandInteraction) {
const developers = await fetchTags(client, client.developers);

const installParams =
client.application?.installParams ?? (await client.application.fetch().then(a => a.installParams));
const inviteURL = client.generateInvite(installParams ?? { scopes: [OAuth2Scopes.Bot] });
const inviteURL = `${DefaultRestOptions.api}${Routes.oauth2Authorization()}?client_id=${client.user.id}`;

return interaction.reply({
embeds: [
Expand All @@ -27,16 +34,16 @@ export async function onSlashCommand(client: Application<true>, interaction: Cha
value: 'By default, it removes standalone G, and it can be chanqed to three different detection levels'
},
{
name: '<:VerifiedBotDev:764412852395180032> Developers',
name: `${env.EMOJI_BOT_DEV} Developers`,
value: developers.join('\n'),
inline: true
},
{
name: '💻 Technoloqy',
value: dedent`
<:gas:896370532751147028> [G.A.S Bot](${inviteURL}) \`v${metadata.version}\`
<:djs:893948932651118653> [discord.js](https://discordjs.dev/) \`v${version}\`
<:node:893952060205178941> [Node.js](https://nodejs.org/) \`${process.version}\`
${env.EMOJI_GAS} [G.A.S Bot](${inviteURL}) \`v${metadata.version}\`
${env.EMOJI_DJS} [discord.js](https://discordjs.dev/) \`v${version}\`
${env.EMOJI_NODE} [Node.js](https://nodejs.org/) \`${process.version}\`
`,
inline: true
}
Expand All @@ -51,4 +58,6 @@ export async function onSlashCommand(client: Application<true>, interaction: Cha

export const slashCommandData = new SlashCommandBuilder()
.setName('info')
.setDescription('Display information about the bot');
.setDescription('Display information about the bot')
.setContexts([InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel])
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall]);
13 changes: 11 additions & 2 deletions src/commands/juan.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import type { Application } from '#classes';
import { type ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
import {
ApplicationIntegrationType,
type ChatInputCommandInteraction,
InteractionContextType,
SlashCommandBuilder
} from 'discord.js';

export function onSlashCommand(client: Application, interaction: ChatInputCommandInteraction) {
return interaction.reply({
Expand All @@ -15,4 +20,8 @@ export function onSlashCommand(client: Application, interaction: ChatInputComman
});
}

export const slashCommandData = new SlashCommandBuilder().setName('juan').setDescription('🐴');
export const slashCommandData = new SlashCommandBuilder()
.setName('juan')
.setDescription('🐴')
.setContexts([InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel])
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall]);
35 changes: 20 additions & 15 deletions src/commands/links.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
import type { Application } from '#classes';
import { env } from '#env';
import { type ChatInputCommandInteraction, OAuth2Scopes, SlashCommandBuilder } from 'discord.js';
import {
ApplicationIntegrationType,
type ChatInputCommandInteraction,
DefaultRestOptions,
InteractionContextType,
Routes,
SlashCommandBuilder
} from 'discord.js';

export async function onSlashCommand(client: Application<true>, interaction: ChatInputCommandInteraction) {
const nog = '<:nog:676105350306594819>';
const gas = '<:gas:896370532751147028>';
const aytchSoftware = '<:AytchSoftware:720949593696894996>';

client.application.installParams ?? (await client.application.fetch());
export function onSlashCommand(client: Application<true>, interaction: ChatInputCommandInteraction) {
const inviteURL = `${DefaultRestOptions.api}${Routes.oauth2Authorization()}?client_id=${client.user.id}`;

return interaction.reply({
embeds: [
{
title: 'Links',
fields: [
{
name: `Want to remove ${nog} in your server?`,
value: `${gas} Invite the bot [here](${client.generateInvite(
client.application.installParams ?? { scopes: [OAuth2Scopes.Bot] }
)})`
name: `Want to remove ${env.EMOJI_NOG} in your server?`,
value: `${env.EMOJI_GAS} Invite the bot [here](${inviteURL})`
},
{
name: 'Want to support the bot?',
value: `⬆️ Upvote it [here](https://top.gg/bot/${client.user.id}/vote)`
},
{
name: 'Need help?',
value: `${aytchSoftware} Join the Support Server [here](${env.SUPPORT_INVITE})`
value: `${env.EMOJI_AYTCH_SOFTWARE} Join the Support Server [here](${env.SUPPORT_INVITE})`
},
{
name: `Do you hate ${nog}?`,
value: `${nog} Join the G Annihilation Squad [here](${env.GAS_INVITE})`
name: `Do you hate ${env.EMOJI_NOG}?`,
value: `${env.EMOJI_NOG} Join the G Annihilation Squad [here](${env.GAS_INVITE})`
}
],
color: client.color
Expand All @@ -39,4 +40,8 @@ export async function onSlashCommand(client: Application<true>, interaction: Cha
});
}

export const slashCommandData = new SlashCommandBuilder().setName('links').setDescription('Useful bot links');
export const slashCommandData = new SlashCommandBuilder()
.setName('links')
.setDescription('Useful bot links')
.setContexts([InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel])
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall]);
5 changes: 4 additions & 1 deletion src/commands/logs.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import type { Application } from '#classes';
import {
ActionRowBuilder,
ApplicationIntegrationType,
ButtonBuilder,
type ButtonInteraction,
ButtonStyle,
ChannelSelectMenuBuilder,
type ChannelSelectMenuInteraction,
ChannelType,
type ChatInputCommandInteraction,
InteractionContextType,
PermissionFlagsBits,
SlashCommandBuilder
} from 'discord.js';
Expand Down Expand Up @@ -127,8 +129,9 @@ export const hasComponent = true;
export const slashCommandData = new SlashCommandBuilder()
.setName('loqs')
.setDescription('Manaqe the loqs channel')
.setContexts([InteractionContextType.Guild])
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
.setDefaultMemberPermissions(PermissionFlagsBits.ManageChannels)
.setDMPermission(false)
.addChannelOption(option =>
option
.setName('channel')
Expand Down
6 changes: 5 additions & 1 deletion src/commands/meme.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import type { Application } from '#classes';
import {
ActionRowBuilder,
ApplicationIntegrationType,
ButtonBuilder,
type ButtonInteraction,
ButtonStyle,
type ChatInputCommandInteraction,
InteractionContextType,
SlashCommandBuilder
} from 'discord.js';

Expand Down Expand Up @@ -70,4 +72,6 @@ export const hasComponent = true;

export const slashCommandData = new SlashCommandBuilder()
.setName('meme')
.setDescription('Displays a extremely funny hilarious meme from Reddit');
.setDescription('Displays a extremely funny hilarious meme from Reddit')
.setContexts([InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel])
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall]);
Loading