Comparing version 1.0.0-ALPHA.2 to 1.0.0-ALPHA.3
{ | ||
"name": "arunabase", | ||
"version": "1.0.0-ALPHA.2", | ||
"version": "1.0.0-ALPHA.3", | ||
"description": "An API made to help developers what works with discord and twitch.", | ||
@@ -32,6 +32,6 @@ "main": "./src/index.js", | ||
"@types/express": "^4.17.15", | ||
"@typescript-eslint/eslint-plugin": "^5.47.0", | ||
"@typescript-eslint/parser": "^5.47.0", | ||
"eslint": "^8.30.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"@typescript-eslint/eslint-plugin": "^5.48.0", | ||
"@typescript-eslint/parser": "^5.48.0", | ||
"eslint": "^8.31.0", | ||
"eslint-config-prettier": "^8.6.0", | ||
"eslint-config-standard": "^17.0.0", | ||
@@ -42,5 +42,5 @@ "eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-promise": "^6.1.1", | ||
"prettier": "^2.8.1", | ||
"prettier": "^2.8.2", | ||
"typescript": "^4.9.4" | ||
} | ||
} |
@@ -0,3 +1,3 @@ | ||
import { Client as DJSClient } from 'discord.js'; | ||
import { IDiscordConfiguration } from '../interfaces'; | ||
import { Client as DJSClient } from 'discord.js'; | ||
import { CommandManager } from './managers'; | ||
@@ -17,2 +17,3 @@ import { Utils } from '@twitchapis/twitch.js'; | ||
getLogger(): Utils.Logger; | ||
login(token?: string): Promise<string>; | ||
} | ||
@@ -19,0 +20,0 @@ export { IntentsBitField as Intents } from 'discord.js'; |
@@ -62,2 +62,13 @@ "use strict"; | ||
} | ||
login(token) { | ||
if (token) { | ||
return super.login(token); | ||
} | ||
else if (this.configuration.token) { | ||
return super.login(this.configuration.token); | ||
} | ||
else { | ||
throw new Error('No token provided.'); | ||
} | ||
} | ||
} | ||
@@ -64,0 +75,0 @@ exports.DiscordClient = DiscordClient; |
@@ -1,6 +0,6 @@ | ||
export * from './Client'; | ||
export * from './structures/'; | ||
export * from './listeners/'; | ||
export * from './managers/'; | ||
export * from './structures/'; | ||
export * as Utils from './utils/'; | ||
export * from './Client'; | ||
export * from './utils/'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -13,23 +13,10 @@ "use strict"; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Utils = void 0; | ||
__exportStar(require("./Client"), exports); | ||
__exportStar(require("./structures/"), exports); | ||
__exportStar(require("./listeners/"), exports); | ||
__exportStar(require("./managers/"), exports); | ||
__exportStar(require("./structures/"), exports); | ||
exports.Utils = __importStar(require("./utils/")); | ||
__exportStar(require("./Client"), exports); | ||
__exportStar(require("./utils/"), exports); |
@@ -16,11 +16,11 @@ "use strict"; | ||
constructor(name, options) { | ||
var _a, _b, _c, _d; | ||
var _a, _b, _c, _d, _e, _f; | ||
this.name = name; | ||
this.description = options.description; | ||
this.isSlashCommand = options.isSlashCommand; | ||
this.isLegacyCommand = options.isLegacyCommand; | ||
this.allowDM = (_a = options.allowDM) !== null && _a !== void 0 ? _a : true; | ||
this.aliases = (_b = options.aliases) !== null && _b !== void 0 ? _b : []; | ||
this.type = (_c = options.type) !== null && _c !== void 0 ? _c : discord_js_1.ApplicationCommandType.ChatInput; // Slash Commands only | ||
this.nsfw = (_d = options.nsfw) !== null && _d !== void 0 ? _d : false; | ||
this.isSlashCommand = (_a = options.isSlashCommand) !== null && _a !== void 0 ? _a : true; | ||
this.isLegacyCommand = (_b = options.isLegacyCommand) !== null && _b !== void 0 ? _b : true; | ||
this.allowDM = (_c = options.allowDM) !== null && _c !== void 0 ? _c : true; | ||
this.aliases = (_d = options.aliases) !== null && _d !== void 0 ? _d : []; | ||
this.type = (_e = options.type) !== null && _e !== void 0 ? _e : discord_js_1.ApplicationCommandType.ChatInput; // Slash Commands only | ||
this.nsfw = (_f = options.nsfw) !== null && _f !== void 0 ? _f : false; | ||
if (options.name_localizations || options.description_localizations) { | ||
@@ -27,0 +27,0 @@ this.isLocalized = true; |
export * from './HTTPClient'; | ||
export * from './RichEmbed'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -18,1 +18,2 @@ "use strict"; | ||
__exportStar(require("./HTTPClient"), exports); | ||
__exportStar(require("./RichEmbed"), exports); |
@@ -6,2 +6,3 @@ import { ClientOptions } from 'discord.js'; | ||
prefix?: string; | ||
shardId?: number; | ||
allowSlashCommands?: boolean; | ||
@@ -8,0 +9,0 @@ allowLegacyCommands?: boolean; |
import { ApplicationCommandOptionType, ApplicationCommandPermissions, ApplicationCommandType, APIApplicationCommandOptionChoice, CategoryChannelType } from 'discord.js'; | ||
import { IDiscordCommandContext } from './IDiscordCommandContext'; | ||
import { DiscordClient } from '../discord'; | ||
@@ -38,3 +39,3 @@ export interface ICommandManagerOptions { | ||
allowDM?: boolean; | ||
command: () => void; | ||
command: (context: IDiscordCommandContext) => void; | ||
guildID?: string; | ||
@@ -48,4 +49,4 @@ aliases?: string[]; | ||
export interface IAsyncCommandOptions extends ICommandOptions { | ||
command: () => Promise<void>; | ||
command: (context: IDiscordCommandContext) => Promise<void>; | ||
} | ||
//# sourceMappingURL=IOptions.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
120699
87
1565