diff --git a/src/commands/pull.ts b/src/commands/pull.ts index 4cdcb3b..7639315 100644 --- a/src/commands/pull.ts +++ b/src/commands/pull.ts @@ -13,7 +13,7 @@ export default class Pull extends Command { this.permissions = { roles: ['662163685439045632'] }; } - public async run(message: Message) { + public async run(message: Message, args: string[]) { try { if (this.client.updating) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Update in progress***`); this.client.updating = true; @@ -28,7 +28,7 @@ export default class Pull extends Command { this.client.updating = false; return updateMessage.edit(updatedMessage); } - if (pull.includes('Already up to date')) { + if (pull.includes('Already up to date') && args[0] !== '-f') { const updatedMessage = updateMessage.content.replace(`${this.client.stores.emojis.loading} ***Fetching latest commit...***`, `${this.client.stores.emojis.success} ***No updates available***`); this.client.updating = false; return updateMessage.edit(updatedMessage); @@ -38,7 +38,8 @@ export default class Pull extends Command { this.client.updating = false; return updateMessage.edit(updatedMessage); } - const continueMessage = updateMessage.content.replace(`${this.client.stores.emojis.loading} ***Fetching latest commit...***`, `${this.client.stores.emojis.success} ***Pulled latest commit***\n${this.client.stores.emojis.loading} ***Reinstalling dependencies...***`); + const continueMessage = updateMessage.content.replace(`${this.client.stores.emojis.loading} ***Fetching latest commit...***`, `${this.client.stores.emojis.success} ***${pull.includes('Already up to date') ? 'No updates available' : 'Fetched latest commit'}***\n` + + `${this.client.stores.emojis.loading} ***Reinstalling dependencies...***`); const passedPull = await updateMessage.edit(continueMessage);