Skip to content

Commit

Permalink
Fix nodejs version
Browse files Browse the repository at this point in the history
  • Loading branch information
Smaug6739 committed Jun 17, 2022
1 parent 014d3e4 commit 14f07f8
Show file tree
Hide file tree
Showing 36 changed files with 1,147 additions and 1,147 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sheweny",
"version": "3.4.2",
"version": "3.4.3",
"description": "The powerful framework for create discord bots",
"main": "build/index.js",
"types": "./typings/index.d.ts",
Expand Down Expand Up @@ -32,7 +32,7 @@
"@sheweny/resolve": "^1.3.2"
},
"devDependencies": {
"@types/node": "^16.6.1",
"@types/node": "^16.6.0",
"discord.js": "^13.3.0",
"ts-node-dev": "^1.1.8"
}
Expand Down
122 changes: 61 additions & 61 deletions typings/client/Client.d.ts
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
import { Client } from 'discord.js';
import { ClientUtil } from './ClientUtil';
import { CLIENT_MODE } from '../constants/constants';
import type { Snowflake, ClientOptions } from 'discord.js';
import type { ShewenyClientOptions, Managers, ManagersCollections, Cooldowns } from '../typescript/interfaces';
/**
* Sheweny framework client
*/
export declare class ShewenyClient extends Client {
/**
* If the client is ready
* @type {boolean}
*/
connected: boolean;
/**
* If the client is ready
* @type {boolean}
*/
cooldowns: Cooldowns;
/**
* The mode of the application (developement or production)
* @type {string}
*/
mode?: typeof CLIENT_MODE.prod | typeof CLIENT_MODE.dev;
/**
* The ID of the bot admins
* @type {Snowflake[]}
*/
admins: Snowflake[];
/**
* The manager of handlers
* @type {Managers}
*/
managers: Managers;
/**
* The collections of handlers
* @type {Managers}
*/
collections: ManagersCollections;
/**
* A util tool to resolve channel, user, get data etc
* @type {ClientUtil}
*/
util: ClientUtil;
/**
* If the client joins a Thread when created
* @type {boolean}
*/
joinThreadsOnCreate: boolean;
/**
* Set options and your client is ready
* @param {ShewenyClientOptions} options Client framework options
* @param {ClientOptions} [clientOptions] Client discord.js options
*/
constructor(options: ShewenyClientOptions, clientOptions?: ClientOptions);
/**
* Return true when the client is ready
* @returns {Promise<boolean>}
*/
awaitReady(): Promise<boolean>;
}
import { Client } from 'discord.js';
import { ClientUtil } from './ClientUtil';
import { CLIENT_MODE } from '../constants/constants';
import type { Snowflake, ClientOptions } from 'discord.js';
import type { ShewenyClientOptions, Managers, ManagersCollections, Cooldowns } from '../typescript/interfaces';
/**
* Sheweny framework client
*/
export declare class ShewenyClient extends Client {
/**
* If the client is ready
* @type {boolean}
*/
connected: boolean;
/**
* If the client is ready
* @type {boolean}
*/
cooldowns: Cooldowns;
/**
* The mode of the application (developement or production)
* @type {string}
*/
mode?: typeof CLIENT_MODE.prod | typeof CLIENT_MODE.dev;
/**
* The ID of the bot admins
* @type {Snowflake[]}
*/
admins: Snowflake[];
/**
* The manager of handlers
* @type {Managers}
*/
managers: Managers;
/**
* The collections of handlers
* @type {Managers}
*/
collections: ManagersCollections;
/**
* A util tool to resolve channel, user, get data etc
* @type {ClientUtil}
*/
util: ClientUtil;
/**
* If the client joins a Thread when created
* @type {boolean}
*/
joinThreadsOnCreate: boolean;
/**
* Set options and your client is ready
* @param {ShewenyClientOptions} options Client framework options
* @param {ClientOptions} [clientOptions] Client discord.js options
*/
constructor(options: ShewenyClientOptions, clientOptions?: ClientOptions);
/**
* Return true when the client is ready
* @returns {Promise<boolean>}
*/
awaitReady(): Promise<boolean>;
}
28 changes: 14 additions & 14 deletions typings/client/ClientUtil.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { DiscordResolve } from '@sheweny/resolve';
import type { ShewenyClient } from '..';
/**
* Utility methods and properties for the client.
*/
export declare class ClientUtil extends DiscordResolve {
client: ShewenyClient;
constructor(client: ShewenyClient);
getCommands(): IterableIterator<import("..").Command>;
getEvents(): IterableIterator<import("..").Event>;
getInhibitors(): IterableIterator<import("..").Inhibitor>;
getButtons(): IterableIterator<import("..").Button>;
getSelectMenus(): IterableIterator<import("..").SelectMenu>;
}
import { DiscordResolve } from '@sheweny/resolve';
import type { ShewenyClient } from '..';
/**
* Utility methods and properties for the client.
*/
export declare class ClientUtil extends DiscordResolve {
client: ShewenyClient;
constructor(client: ShewenyClient);
getCommands(): IterableIterator<import("..").Command>;
getEvents(): IterableIterator<import("..").Event>;
getInhibitors(): IterableIterator<import("..").Inhibitor>;
getButtons(): IterableIterator<import("..").Button>;
getSelectMenus(): IterableIterator<import("..").SelectMenu>;
}
120 changes: 60 additions & 60 deletions typings/constants/constants.d.ts
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
/**
* Client constants
*/
export declare const CLIENT_MODE: {
dev: "development";
prod: "production";
};
export declare const CLIENT_UTIL: {
allIntents: import("discord.js").Intents;
allPartials: import("discord.js").PartialTypes[];
};
/**
* Command constants
*/
export declare const COMMAND_TYPE: {
cmdMsg: "MESSAGE_COMMAND";
cmdSlash: "SLASH_COMMAND";
ctxMsg: "CONTEXT_MENU_MESSAGE";
ctxUser: "CONTEXT_MENU_USER";
};
export declare const COMMAND_CHANNEL: {
dm: "DM";
guild: "GUILD";
};
export declare const COMMAND_MESSAGE_ARGS_TYPE: {
string: "STRING";
number: "NUMBER";
boolean: "BOOLEAN";
rest: "REST";
guild: "GUILD";
channel: "CHANNEL";
member: "MEMBER";
guild_emoji: "GUILD_EMOJI";
role: "ROLE";
user: "USER";
};
export declare const COMMAND_PERMISSIONS: {
admin: "BOT_ADMIN";
};
export declare const COMMAND_EVENTS: {
userMissingPerm: "userMissingPermissions";
clientMissingPerm: "clientMissingPermissions";
cooldownLimit: "cooldownLimit";
};
export declare const BUTTON_EVENTS: {
cooldownLimit: "cooldownLimit";
};
export declare const SELECT_EVENTS: {
cooldownLimit: "cooldownLimit";
};
/**
* Inhibitor constants
*/
export declare const INHIBITOR_TYPE: {
message: "MESSAGE_COMMAND";
appCommand: "APPLICATION_COMMAND";
button: "BUTTON";
select: "SELECT_MENU";
all: "ALL";
};
/**
* Client constants
*/
export declare const CLIENT_MODE: {
dev: "development";
prod: "production";
};
export declare const CLIENT_UTIL: {
allIntents: import("discord.js").Intents;
allPartials: import("discord.js").PartialTypes[];
};
/**
* Command constants
*/
export declare const COMMAND_TYPE: {
cmdMsg: "MESSAGE_COMMAND";
cmdSlash: "SLASH_COMMAND";
ctxMsg: "CONTEXT_MENU_MESSAGE";
ctxUser: "CONTEXT_MENU_USER";
};
export declare const COMMAND_CHANNEL: {
dm: "DM";
guild: "GUILD";
};
export declare const COMMAND_MESSAGE_ARGS_TYPE: {
string: "STRING";
number: "NUMBER";
boolean: "BOOLEAN";
rest: "REST";
guild: "GUILD";
channel: "CHANNEL";
member: "MEMBER";
guild_emoji: "GUILD_EMOJI";
role: "ROLE";
user: "USER";
};
export declare const COMMAND_PERMISSIONS: {
admin: "BOT_ADMIN";
};
export declare const COMMAND_EVENTS: {
userMissingPerm: "userMissingPermissions";
clientMissingPerm: "clientMissingPermissions";
cooldownLimit: "cooldownLimit";
};
export declare const BUTTON_EVENTS: {
cooldownLimit: "cooldownLimit";
};
export declare const SELECT_EVENTS: {
cooldownLimit: "cooldownLimit";
};
/**
* Inhibitor constants
*/
export declare const INHIBITOR_TYPE: {
message: "MESSAGE_COMMAND";
appCommand: "APPLICATION_COMMAND";
button: "BUTTON";
select: "SELECT_MENU";
all: "ALL";
};
8 changes: 4 additions & 4 deletions typings/events/interactionAutocompleteCreate.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AutocompleteInteraction } from 'discord.js';
import type { ShewenyClient } from '..';
import type { CommandInteraction, ContextMenuInteraction } from 'discord.js';
export default function run(client: ShewenyClient, interaction: CommandInteraction | ContextMenuInteraction | AutocompleteInteraction): Promise<any>;
import { AutocompleteInteraction } from 'discord.js';
import type { ShewenyClient } from '..';
import type { CommandInteraction, ContextMenuInteraction } from 'discord.js';
export default function run(client: ShewenyClient, interaction: CommandInteraction | ContextMenuInteraction | AutocompleteInteraction): Promise<any>;
6 changes: 3 additions & 3 deletions typings/events/interactionButtonCreate.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import type { ButtonInteraction } from 'discord.js';
import type { ShewenyClient } from '../client/Client';
export default function run(client: ShewenyClient, interaction: ButtonInteraction): Promise<any>;
import type { ButtonInteraction } from 'discord.js';
import type { ShewenyClient } from '../client/Client';
export default function run(client: ShewenyClient, interaction: ButtonInteraction): Promise<any>;
8 changes: 4 additions & 4 deletions typings/events/interactionCommandCreate.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AutocompleteInteraction } from 'discord.js';
import type { ShewenyClient } from '..';
import type { CommandInteraction, ContextMenuInteraction } from 'discord.js';
export default function run(client: ShewenyClient, interaction: CommandInteraction | ContextMenuInteraction | AutocompleteInteraction): Promise<any>;
import { AutocompleteInteraction } from 'discord.js';
import type { ShewenyClient } from '..';
import type { CommandInteraction, ContextMenuInteraction } from 'discord.js';
export default function run(client: ShewenyClient, interaction: CommandInteraction | ContextMenuInteraction | AutocompleteInteraction): Promise<any>;
6 changes: 3 additions & 3 deletions typings/events/interactionCreate.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import type { Interaction } from 'discord.js';
import type { ShewenyClient } from '../client/Client';
export default function run(client: ShewenyClient, interaction: Interaction): void;
import type { Interaction } from 'discord.js';
import type { ShewenyClient } from '../client/Client';
export default function run(client: ShewenyClient, interaction: Interaction): void;
6 changes: 3 additions & 3 deletions typings/events/interactionSelectMenuCreate.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import type { SelectMenuInteraction } from 'discord.js';
import type { ShewenyClient } from '../client/Client';
export default function run(client: ShewenyClient, interaction: SelectMenuInteraction): Promise<any>;
import type { SelectMenuInteraction } from 'discord.js';
import type { ShewenyClient } from '../client/Client';
export default function run(client: ShewenyClient, interaction: SelectMenuInteraction): Promise<any>;
6 changes: 3 additions & 3 deletions typings/events/messageCreate.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import type { ShewenyClient } from '../client/Client';
import type { Message } from 'discord.js';
export default function run(client: ShewenyClient, message: Message): Promise<any>;
import type { ShewenyClient } from '../client/Client';
import type { Message } from 'discord.js';
export default function run(client: ShewenyClient, message: Message): Promise<any>;
4 changes: 2 additions & 2 deletions typings/events/ready.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import type { ShewenyClient } from '../client/Client';
export default function run(client: ShewenyClient): Promise<void>;
import type { ShewenyClient } from '../client/Client';
export default function run(client: ShewenyClient): Promise<void>;
6 changes: 3 additions & 3 deletions typings/events/threadCreate.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import type { ThreadChannel } from 'discord.js';
import type { ShewenyClient } from '../client/Client';
export default function run(client: ShewenyClient, thread: ThreadChannel): Promise<void>;
import type { ThreadChannel } from 'discord.js';
import type { ShewenyClient } from '../client/Client';
export default function run(client: ShewenyClient, thread: ThreadChannel): Promise<void>;
8 changes: 4 additions & 4 deletions typings/helpers/ShewenyError.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShewenyClient } from '../client/Client';
export declare class ShewenyError extends Error {
constructor(client: ShewenyClient, err: any, ...args: any[]);
}
import { ShewenyClient } from '../client/Client';
export declare class ShewenyError extends Error {
constructor(client: ShewenyClient, err: any, ...args: any[]);
}
18 changes: 9 additions & 9 deletions typings/helpers/ShewenyInformation.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { ShewenyClient } from '../client/Client';
/**
* Information class for Sheweny.
*/
export declare class ShewenyInformation {
client: ShewenyClient;
message: string;
constructor(client: ShewenyClient, message: string);
}
import type { ShewenyClient } from '../client/Client';
/**
* Information class for Sheweny.
*/
export declare class ShewenyInformation {
client: ShewenyClient;
message: string;
constructor(client: ShewenyClient, message: string);
}
8 changes: 4 additions & 4 deletions typings/helpers/ShewenyWarning.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ShewenyClient } from '../client/Client';
export declare class ShewenyWarning {
constructor(client: ShewenyClient, name: string, ...args: any[]);
}
import type { ShewenyClient } from '../client/Client';
export declare class ShewenyWarning {
constructor(client: ShewenyClient, name: string, ...args: any[]);
}
6 changes: 3 additions & 3 deletions typings/helpers/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { ShewenyError } from './ShewenyError';
export { ShewenyWarning } from './ShewenyWarning';
export { ShewenyInformation } from './ShewenyInformation';
export { ShewenyError } from './ShewenyError';
export { ShewenyWarning } from './ShewenyWarning';
export { ShewenyInformation } from './ShewenyInformation';
Loading

0 comments on commit 14f07f8

Please sign in to comment.