-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore: command's endpoints #25630
Chore: command's endpoints #25630
Conversation
}); | ||
slashCommands.add( | ||
'shrug', | ||
(_command: 'shrug', params, item): void => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An anonymous function is harder to debug.
}); | ||
slashCommands.add( | ||
'tableflip', | ||
(_command, params, item): void => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An anonymous function is harder to debug.
let channel = params.trim(); | ||
slashCommands.add( | ||
'archive', | ||
function Archive(_command, params, item): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nesting this function declaration as a parameter expression damages readability, as evidenced by the indentation increase.
}); | ||
slashCommands.add( | ||
'bridge', | ||
function Bridge(_command, stringParams, item): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nesting this function declaration as a parameter expression damages readability, as evidenced by the indentation increase.
regex.lastIndex++; | ||
slashCommands.add( | ||
'create', | ||
function Create(_command: 'create', params, item): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nesting this function declaration as a parameter expression damages readability, as evidenced by the indentation increase.
slashCommands.add( | ||
'create', | ||
function Create(_command: 'create', params, item): void { | ||
function getParams(str: string): string[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick
Maybe move it to the outer scope.
const user = Users.findOneById(userId); | ||
slashCommands.add( | ||
'help', | ||
function Help(_command, _params, item): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nesting this function declaration as a parameter expression damages readability, as evidenced by the indentation increase.
const userId = Meteor.userId() as string; | ||
slashCommands.add( | ||
'status', | ||
function Status(_command, params, item): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nesting this function declaration as a parameter expression damages readability, as evidenced by the indentation increase.
const userId = Meteor.userId() as string; | ||
slashCommands.add( | ||
'status', | ||
function Status(_command: 'status', params, item): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nesting this function declaration as a parameter expression damages readability, as evidenced by the indentation increase.
handleError(err); | ||
slashCommands.add( | ||
'topic', | ||
function Topic(_command: 'topic', params, item): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nesting this function declaration as a parameter expression damages readability, as evidenced by the indentation increase.
}); | ||
slashCommands.add( | ||
'topic', | ||
function Topic(_command: 'topic', params, item): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nesting this function declaration as a parameter expression damages readability, as evidenced by the indentation increase.
let room; | ||
slashCommands.add( | ||
'unarchive', | ||
function Unarchive(_command: 'unarchive', params, item): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nesting this function declaration as a parameter expression damages readability, as evidenced by the indentation increase.
if I do it the other way, it will force me to type the functions, which is a dynamic type, and it looks horrible @tassoevan |
* origin/develop: (45 commits) [FIX] Thread Message Preview (#25709) [FIX] Bump meteor-node-stubs to version 1.2.3 (#25669) [IMPROVE] Refactor + unit tests for federation-v2 (#25680) [FIX] user status Offline misnamed as Invisible in Custom Status edit dropdown menu (#24796) Chore: Messages raw model rewrite to ts (#25761) Chore: migrate katex to ts (#25501) Chore: AutoTranslate contextualBar rewrite (#25751) Chore: Replace AnnouncementModal in favor of GenericModal (#25752) Chore: Keyboard shortcuts contextualBar rewrite (#25753) Chore: Prune Messages contextualBar rewrite (#25757) Chore: add Ajv JSON Schema to api/v1 (#25601) Update package.json (#25755) Update CODEOWNERS Chore: remove duplicated NotFoundPage.js (#25749) Chore: command's endpoints (#25630) Chore: Fix incorrect checksum for agenda package (cause of breaking develop builds) (#25741) Chore: Remove duplicate checksumBehavior key from yarn file (#25730) [FIX] Custom emoji reaction size (#25393) Chore: Test for department screen (#25696) Chore: Taking out Blaze from routes with `MainLayout` (#25697) ...
* origin/develop: (26 commits) [FIX] Thread Message Preview (#25709) [FIX] Bump meteor-node-stubs to version 1.2.3 (#25669) [IMPROVE] Refactor + unit tests for federation-v2 (#25680) [FIX] user status Offline misnamed as Invisible in Custom Status edit dropdown menu (#24796) Chore: Messages raw model rewrite to ts (#25761) Chore: migrate katex to ts (#25501) Chore: AutoTranslate contextualBar rewrite (#25751) Chore: Replace AnnouncementModal in favor of GenericModal (#25752) Chore: Keyboard shortcuts contextualBar rewrite (#25753) Chore: Prune Messages contextualBar rewrite (#25757) Chore: add Ajv JSON Schema to api/v1 (#25601) Update package.json (#25755) Update CODEOWNERS Chore: remove duplicated NotFoundPage.js (#25749) Chore: command's endpoints (#25630) Chore: Fix incorrect checksum for agenda package (cause of breaking develop builds) (#25741) Chore: Remove duplicate checksumBehavior key from yarn file (#25730) [FIX] Custom emoji reaction size (#25393) Chore: Test for department screen (#25696) Chore: Taking out Blaze from routes with `MainLayout` (#25697) ...
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments