File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ class UserManager extends CachedManager {
105105 * Flags may still be retrieved via {@link UserManager#fetch}.</warn>
106106 */
107107 async fetchFlags ( user , options ) {
108- emitDeprecationWarningForUserFetchFlags ( true ) ;
108+ emitDeprecationWarningForUserFetchFlags ( this . constructor . name ) ;
109109 return ( await this . fetch ( user , options ) ) . flags ;
110110 }
111111
Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ class User extends Base {
351351 * Flags may still be retrieved via {@link User#fetch}.</warn>
352352 */
353353 fetchFlags ( force = false ) {
354- emitDeprecationWarningForUserFetchFlags ( false ) ;
354+ emitDeprecationWarningForUserFetchFlags ( this . constructor . name ) ;
355355 return this . client . users . fetchFlags ( this . id , { force } ) ;
356356 }
357357
Original file line number Diff line number Diff line change @@ -504,12 +504,11 @@ function resolveSKUId(resolvable) {
504504
505505/**
506506 * Deprecation function for fetching user flags.
507- * @param {boolean } userManager Whether the class name is the user manager
507+ * @param {string } name Name of the class
508508 * @private
509509 */
510- function emitDeprecationWarningForUserFetchFlags ( userManager ) {
510+ function emitDeprecationWarningForUserFetchFlags ( name ) {
511511 if ( deprecationEmittedForUserFetchFlags ) return ;
512- const name = userManager ? 'UserManager' : 'User' ;
513512 process . emitWarning ( `${ name } #fetchFlags() is deprecated. Use ${ name } #fetch() instead.` ) ;
514513 deprecationEmittedForUserFetchFlags = true ;
515514}
You can’t perform that action at this time.
0 commit comments