<commit_before>//
//  VoiceState.swift
//  Sword
//
//  Created by <NAME>
//  Copyright © 2017 <NAME>. All rights reserved.
//

/// Structure with user's voice state info
public struct VoiceState {

  // MARK: Properties

  /// The ID of the voice channel
  public let channelId: String

  /// Whether or not the user is server deafend
  public let isDeafend: Bool

  /// Whether or not the user is server muted
  public let isMuted: Bool

  /// Whether or not the user self deafend themselves
  public let isSelfDeafend: Bool

  /// Whether or not the user self muted themselves
  public let isSelfMuted: Bool

  /// Whether or not the bot suppressed the user
  public let isSuppressed: Bool

  /// The Session ID of the user and voice connection
  public let sessionId: String

  // MARK: Initializer

  /**
   Cretaes VoiceState structure

   - parameter json: The json data
  */
  init(_ json: [String: Any]) {
    self.channelId = json["channel_id"] as! String
    self.isDeafend = json["deaf"] as! Bool
    self.isMuted = json["mute"] as! Bool

    #if !os(Linux)
    self.isSelfDeafend = json["self_deaf"] as! Bool
    self.isSelfMuted = json["self_mute"] as! Bool
    #else
    self.isSelfDeafend = (json["self_deaf"] as! Int) != 0
    self.isSelfMuted = (json["self_mute"] as! Int) != 0
    #endif
    self.isSuppressed = json["suppress"] as! Bool
    self.sessionId = json["session_id"] as! String
  }

}
<commit_msg>this is fixed in later versions<commit_after>//
//  VoiceState.swift
//  Sword
//
//  Created by <NAME>
//  Copyright © 2017 <NAME>. All rights reserved.
//

/// Structure with user's voice state info
public struct VoiceState {

  // MARK: Properties

  /// The ID of the voice channel
  public let channelId: String

  /// Whether or not the user is server deafend
  public let isDeafend: Bool

  /// Whether or not the user is server muted
  public let isMuted: Bool

  /// Whether or not the user self deafend themselves
  public let isSelfDeafend: Bool

  /// Whether or not the user self muted themselves
  public let isSelfMuted: Bool

  /// Whether or not the bot suppressed the user
  public let isSuppressed: Bool

  /// The Session ID of the user and voice connection
  public let sessionId: String

  // MARK: Initializer

  /**
   Cretaes VoiceState structure

   - parameter json: The json data
  */
  init(_ json: [String: Any]) {
    self.channelId = json["channel_id"] as! String
    self.isDeafend = json["deaf"] as! Bool
    self.isMuted = json["mute"] as! Bool
    self.isSelfDeafend = json["self_deaf"] as! Bool
    self.isSelfMuted = json["self_mute"] as! Bool
    self.isSuppressed = json["suppress"] as! Bool
    self.sessionId = json["session_id"] as! String
  }

}

{'fraction_non_alphanumeric': 0.10526315789473684, 'fraction_numerical': 0.00368052999631947, 'mean_word_length': 2.8995695839311333, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3273081', 'n_tokens_mistral': 904, 'n_tokens_neox': 833, 'n_words': 317}