-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating code to adhere to new linting rules
- Loading branch information
1 parent
e8f4297
commit 664988c
Showing
92 changed files
with
936 additions
and
816 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import HelpEntry from './HelpEntry'; | ||
import Commands from '../Commands'; | ||
|
||
class CommandHelpEntry extends HelpEntry { | ||
constructor(command) { | ||
super(command.getName(), command.getDescription()); | ||
this.command = command; | ||
} | ||
|
||
toRawMessage() { | ||
const message = { rawtext: [{ text: `§2${this.command.getUsage()}§8 - ` }, this.description] }; | ||
for (const helpEntry of this.command.getHelpEntries()) | ||
message.rawtext.push({ rawtext: [{ text: `\n §7> §2${Commands.getPrefix()}${helpEntry.usage}§8 - ` }, helpEntry.description] }); | ||
|
||
return message; | ||
} | ||
} | ||
|
||
export default CommandHelpEntry; |
Oops, something went wrong.