annotated class methods

This commit is contained in:
mmacierzanka committed 2021-09-02 21:03:52 +02:00
1 parent 69b91f82f3
commit 7701e5e4fd
6 files changed
+15 -15

No files matched your search

+2 -2
View File
@@ -116,7 +116,7 @@ export class Bot extends EventEmitter {
* @param {boolean} [register=true] - if *true* or *undefined*, the bot will register all slash commands in Discord API
* @returns {Promise<boolean>} whether this operation has been completed successfully
*/
async start(port?: number, register?: boolean): Promise<boolean> {
public async start(port?: number, register?: boolean): Promise<boolean> {
try {
console.log(`\nBot name: ${this.name}`);
console.log(`Prefix: ${this.commands.prefix || "/ (only slash commands)"} \n`);
@@ -244,7 +244,7 @@ export class Bot extends EventEmitter {
* Registers commands from {@link CommandManager} in Discord API
* @returns {Promise<void>}
*/
async register(): Promise<void> {
public async register(): Promise<void> {
process.stdout.write("Registering commands... ");
await axios.put(
`https://discord.com/api/v8/applications/${this.applicationId}/commands`,