static async appendTimezone(context, message, timeArg) {
    if (timeArg.timeType === TimeArg.DISTANCE_TYPE) {
      return;
    }

    const serverTimezone = await context.dbManager.getSetting(
      message.source.name,
      message.orgId,
      ServerSettingsTable.SERVER_SETTINGS.timezone.name
    );

    const userTimezone = await context.dbManager.getUserSetting(
      message.source.name,
      message.orgId,
      message.userId,
      UserSettingsTable.USER_SETTINGS.timezone.name
    );

    let tz = DefaultTimeZone;
    if (userTimezone !== undefined) {
      tz = userTimezone;
    } else if (serverTimezone !== undefined) {
      tz = serverTimezone;
    }

    timeArg.addParsedDefinition({ amount: tz, shiftType: TimeArg.SHIFT_TYPES.timezone });
  }
/**
   * Appends a timezone definition to a TimeArg, based on organization's or individual preference for the timezone.
   * @see TimeArg
   * @param  {Context}      context     the Bot's context
   * @param  {BaseMessage}  message     the Discord message with the argument
   * @param  {TimeArg}      timeArg     the time argument to edit
   * @return {Promise}                  nothing
   */
Appends a timezone definition to a TimeArg, based on organization's or individual preference for the timezone.
Appends a timezone definition to a TimeArg based on organization ' s or individual preference for the timezone .
static async appendTimezone(context, message, timeArg) {
    if (timeArg.timeType === TimeArg.DISTANCE_TYPE) {
      return;
    }
    const serverTimezone = await context.dbManager.getSetting(
      message.source.name,
      message.orgId,
      ServerSettingsTable.SERVER_SETTINGS.timezone.name
    );
    const userTimezone = await context.dbManager.getUserSetting(
      message.source.name,
      message.orgId,
      message.userId,
      UserSettingsTable.USER_SETTINGS.timezone.name
    );
    let tz = DefaultTimeZone;
    if (userTimezone !== undefined) {
      tz = userTimezone;
    } else if (serverTimezone !== undefined) {
      tz = serverTimezone;
    }
    timeArg.addParsedDefinition({ amount: tz, shiftType: TimeArg.SHIFT_TYPES.timezone });
  }
static async appendTimezone ( context , message , timeArg ) { if ( timeArg . timeType === TimeArg . DISTANCE_TYPE ) { return ; } const serverTimezone = await context . dbManager . getSetting ( message . source . name , message . orgId , ServerSettingsTable . SERVER_SETTINGS . timezone . name ) ; const userTimezone = await context . dbManager . getUserSetting ( message . source . name , message . orgId , message . userId , UserSettingsTable . USER_SETTINGS . timezone . name ) ; let tz = DefaultTimeZone ; if ( userTimezone !== undefined ) { tz = userTimezone ; } else if ( serverTimezone !== undefined ) { tz = serverTimezone ; } timeArg . addParsedDefinition ( { amount : tz , shiftType : TimeArg . SHIFT_TYPES . timezone } ) ; }
Appends a timezone definition to a TimeArg, based on organization's or individual preference for the timezone.
Appends a timezone definition to a TimeArg based on organization ' s or individual preference for the timezone .