Skip to content

Commit

Permalink
update: release v0.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
POPPIN-FUMI committed Nov 13, 2023
1 parent ba2fde8 commit 49cf815
Show file tree
Hide file tree
Showing 43 changed files with 199 additions and 98 deletions.
2 changes: 1 addition & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ export type { ReleaseInfo } from './lib/discordChangeLog';
export type { DiscordUser, GuildMember } from './types/DiscordUser';
export type { Message, TextChannel, TextChannelType, MessageComponentType, Interaction, MessageComponentInteraction, ApplicationCommandData, } from 'discord.js';
export { InteractionResponseType, InteractionType, verifyKey, ButtonStyleTypes, MessageComponentTypes, } from 'discord-interactions';
export { ComponentType, TextInputStyle, ButtonStyle } from 'discord.js';
export { ComponentType, TextInputStyle, ButtonStyle, SlashCommandBuilder, } from 'discord.js';
64 changes: 32 additions & 32 deletions dist/index.js

Large diffs are not rendered by default.

34 changes: 14 additions & 20 deletions dist/lib/deployCommands.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ApplicationCommandData } from 'discord.js';
import { SlashCommandBuilder } from 'discord.js';
/**
* Deploys application commands to a specific guild.
*
Expand All @@ -8,37 +8,31 @@ import { ApplicationCommandData } from 'discord.js';
* @param {string} token - The token used for authentication with the Discord API.
* @param {string} discordClientId - The Discord client ID.
* @param {string} guildId - The ID of the guild where commands are being deployed.
* @param {ApplicationCommandData[]} commands - An array of ApplicationCommandData representing the commands to be deployed.
* @param { SlashCommandBuilder[]} commands - An array of SlashCommandBuilder representing the commands to be deployed.
* @returns {Promise<void>} A promise that resolves when commands are successfully deployed.
* @throws {Error} Will throw an error if there is a problem with the deployment.
*
* @example
* ```typescript
* import { config } from 'dotenv'
* config()
* const run = async () => {
* const token = process.env.DISCORD_TOKEN || ''
* const discordClientId = process.env.DISCORD_CLIENT_ID || ''
* const guildId = process.env.DISCORD_GUILD_ID || ''
* import { commands } from "./commands";
* import { deployCommands } from "@skeet-framework/discord-utils";
* import { DISCORD_APPLICATION_ID, DISCORD_GUILD_ID } from "../config";
*
* const commands = [
* {
* name: 'ping',
* description: 'Replies with pong',
* },
* ]
* const commandsData = Object.values(commands).map((command) => command.data);
*
* const run = async () => {
* const token = process.argv[2] || '';
* try {
* await deployCommands(token, discordClientId, guildId, commands)
* console.log('Commands deployed successfully.')
* await deployCommands(token, DISCORD_APPLICATION_ID, DISCORD_GUILD_ID, commandsData);
* console.log('Commands deployed successfully.');
* } catch (error) {
* console.error(`Error deploying commands: ${error}`)
* console.error(`Error deploying commands: ${error}`);
* }
* }
* };
*
* run()
* .then(() => console.log('Done'))
* .catch((error) => console.error(error))
* .catch((error) => console.error(error));
* ```
*/
export declare function deployCommands(token: string, discordClientId: string, guildId: string, commands: ApplicationCommandData[]): Promise<void>;
export declare function deployCommands(token: string, discordClientId: string, guildId: string, commands: SlashCommandBuilder[]): Promise<void>;
2 changes: 1 addition & 1 deletion dist/lib/version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const VERSION = "0.2.7";
export declare const VERSION = "0.2.8";
11 changes: 9 additions & 2 deletions docs/assets/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
--dark-hl-6: #C586C0;
--light-hl-7: #000000FF;
--dark-hl-7: #D4D4D4;
--light-hl-8: #267F99;
--dark-hl-8: #4EC9B0;
--light-hl-8: #098658;
--dark-hl-8: #B5CEA8;
--light-hl-9: #267F99;
--dark-hl-9: #4EC9B0;
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}
Expand All @@ -31,6 +33,7 @@
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--code-background: var(--light-code-background);
} }

Expand All @@ -44,6 +47,7 @@
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--code-background: var(--dark-code-background);
} }

Expand All @@ -57,6 +61,7 @@
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--code-background: var(--light-code-background);
}

Expand All @@ -70,6 +75,7 @@
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--code-background: var(--dark-code-background);
}

Expand All @@ -82,4 +88,5 @@
.hl-6 { color: var(--hl-6); }
.hl-7 { color: var(--hl-7); }
.hl-8 { color: var(--hl-8); }
.hl-9 { color: var(--hl-9); }
pre, code { background: var(--code-background); }
2 changes: 1 addition & 1 deletion docs/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/classes/Message.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/MessageComponentInteraction.html

Large diffs are not rendered by default.

Loading

0 comments on commit 49cf815

Please sign in to comment.