├── .gitignore ├── .rubocop.yml ├── Gemfile ├── Gemfile.lock ├── README.md ├── app.rb ├── event_examples ├── accepted_instant_invite.json ├── ack_messages.json ├── activity_updated.json ├── add_channel_recipient.json ├── add_reaction.json ├── af_exited.json ├── af_loaded.json ├── af_viewed.json ├── app_opened.json ├── application_assets_enabled.json ├── application_created.json ├── application_updated.json ├── authorize_login_location.json ├── authorized_app_connected.json ├── change_log_closed.json ├── change_log_opened.json ├── channel_notice_closed.json ├── channel_notice_viewed.json ├── channel_opened.json ├── claim_account.json ├── click_landing_cta.json ├── close_tutorial.json ├── connected_account_initiated.json ├── connected_account_viewed.json ├── copy_instant_invite.json ├── create_channel.json ├── create_emoji.json ├── create_guild.json ├── create_instant_invite.json ├── create_oauth2_application.json ├── data_request_initiated.json ├── delete_emoji.json ├── delete_guild.json ├── detect_platform_account.json ├── download_app.json ├── enable_notifications.json ├── experiment_guild_triggered.json ├── experiment_user_triggered.json ├── footer_navigation.json ├── friend_request_failed.json ├── friends_list_viewed.json ├── game_news_changed.json ├── game_opened.json ├── guild_settings_opened.json ├── guild_viewed.json ├── hook_result.json ├── ignore_platform_account.json ├── input_mute.json ├── input_unmute.json ├── invite_app_invoked.json ├── invite_opened.json ├── invite_sent.json ├── invite_suggestion_opened.json ├── invite_viewed.json ├── join_call.json ├── join_experiment.json ├── join_voice_channel.json ├── joined_integration.json ├── jump.json ├── launch_game.json ├── leave_guild.json ├── leave_voice_channel.json ├── local_settings_updated.json ├── login_successful.json ├── login_viewed.json ├── main_navigation_menu.json ├── message_attachment_updated.json ├── message_edited.json ├── mktg_hypesquad_form_opened.json ├── mktg_hypesquad_loaded.json ├── mktg_page_viewed.json ├── nav_drawer_opened.json ├── new_login_location.json ├── notification_clicked.json ├── notification_sent_game_launched.json ├── notification_viewed.json ├── nuf_step_complete.json ├── nuo_guild_info.json ├── open_modal.json ├── open_popout.json ├── output_mute.json ├── output_unmute.json ├── overlay_hook_result.json ├── overlay_hooked.json ├── overlay_hooking.json ├── overlay_initialized.json ├── overlay_locked.json ├── overlay_unlocked.json ├── permissions_acked.json ├── permissions_requested.json ├── pin_message.json ├── premium_page_opened.json ├── premium_purchase_started.json ├── quickswitcher_closed.json ├── quickswitcher_opened.json ├── quickswitcher_result_selected.json ├── register.json ├── remove_channel_recipient.json ├── remove_reaction.json ├── resolve_invite.json ├── ring_call.json ├── search_closed.json ├── search_opened.json ├── search_result_expanded.json ├── search_result_sort_changed.json ├── search_result_viewed.json ├── search_started.json ├── send_message.json ├── session_end.json ├── session_start.json ├── settings_pane_viewed.json ├── show_tutorial.json ├── slash_command_used.json ├── soundshare_attached.json ├── soundshare_transmitting.json ├── start_call.json ├── start_listening.json ├── start_speaking.json ├── stop_ringing_call.json ├── stop_speaking.json ├── streamer_mode_toggle.json ├── strict_ssl_request_attempt.json ├── tweet_instant_invite.json ├── update_connected_account.json ├── update_note.json ├── update_relationship.json ├── update_streamer_mode_settings.json ├── update_user_settings.json ├── user_account_updated.json ├── user_avatar_updated.json ├── user_settings_opened.json ├── verify_account.json ├── video_input_toggled.json ├── video_layout_toggled.json ├── view_landing.json ├── voice_connect.json ├── voice_connection_success.json ├── voice_disconnect.json └── voice_quality.json ├── event_list.txt ├── examples ├── markov.png ├── message_analysis_charts.png ├── messages_by_date.png └── os_device_words_location.png ├── public ├── favicon.ico ├── index.css ├── index.html.erb └── index.js.erb └── src ├── analyzers ├── account_analyzer.rb ├── activity_analyzer.rb └── messages_analyzer.rb ├── arg_parser.rb ├── processors ├── game_processor.rb ├── message_by_date_processor.rb ├── message_content_processor.rb ├── message_prettifier_processor.rb ├── reaction_processor.rb ├── session_processor.rb ├── verify_events_processor.rb └── voice_processor.rb ├── result_renderer.rb └── utils.rb /.gitignore: -------------------------------------------------------------------------------- 1 | data/ 2 | output/ 3 | tmp/ 4 | .idea/ 5 | *.csv 6 | *.exe 7 | *.html -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | Metrics/MethodLength: 2 | Enabled: false 3 | 4 | Metrics/AbcSize: 5 | Enabled: false 6 | 7 | Metrics/LineLength: 8 | Enabled: false 9 | 10 | Metrics/CyclomaticComplexity: 11 | Enabled: false 12 | 13 | Metrics/PerceivedComplexity: 14 | Enabled: false 15 | 16 | Layout/EndOfLine: 17 | Enabled: false 18 | 19 | Layout/IndentationWidth: 20 | Width: 4 21 | IgnoredPatterns: [] 22 | 23 | Style/Documentation: 24 | Enabled: false 25 | 26 | Style/WordArray: 27 | Enabled: false 28 | 29 | Style/SymbolArray: 30 | Enabled: false 31 | 32 | Style/GuardClause: 33 | Enabled: false 34 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | ruby '>= 2.0.0' 3 | 4 | gem 'smarter_csv' 5 | gem 'ocra' 6 | gem 'os' 7 | gem 'tzinfo' 8 | gem 'tzinfo-data' -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | concurrent-ruby (1.1.8) 5 | msgpack (1.4.2) 6 | ocra (1.3.11) 7 | os (1.1.1) 8 | smarter_csv (1.2.8) 9 | tzinfo (2.0.4) 10 | concurrent-ruby (~> 1.0) 11 | tzinfo-data (1.2021.1) 12 | tzinfo (>= 1.0.0) 13 | 14 | PLATFORMS 15 | ruby 16 | x64-mingw32 17 | 18 | DEPENDENCIES 19 | ocra 20 | os 21 | smarter_csv 22 | tzinfo 23 | tzinfo-data 24 | 25 | RUBY VERSION 26 | ruby 2.5.1p57 27 | 28 | BUNDLED WITH 29 | 1.16.4 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![demo](/examples/message_analysis_charts.png) 2 | 3 | # Requirements 4 | Ruby >=2.0 5 | 6 | # Usage 7 | Bundle is required to manage dependencies 8 | ``` 9 | gem install bundle 10 | bundle 11 | ``` 12 | To run the application: 13 | ``` 14 | ruby app.rb --data-path=[PATH_TO_BACK_UP] 15 | ``` 16 | #### Arguments 17 | ``` 18 | --data-path=[PATH_TO_BACK_UP] #specifies the directory of the backup 19 | --word-min-length=[LENGTH] #specifies a minimum length of commonly used word data 20 | --thread-id=[ID] #specifies a specific thread to perform message analysis on 21 | --normalize-time=[true/false] #parse message timestamps in the timezone they were sent from, default: true 22 | --timezone=[TIMEZONE] #specifies the timezone/offset to parse the data in. Will accept RFC 2822 specified timezones or ±HH:MM UTC offsets 23 | --months=[months] #specifies how far back to process messages (the backup only has consistent data for past 6 months), default: 6 24 | --rebuild-binary #rebuilds an executable using ocra 25 | --quick-run #parse a subset of the available data for testing purposes 26 | --update-events #see event section below 27 | --verify-events #see event section below 28 | ```` 29 | 30 | **An executable version can also be found [here](https://github.com/Brainicism/DiscordDataParser/releases).** Simply execute it in the backup folder. 31 | 32 | An HTML file is generated with various charts to display the processed data. 33 | 34 | Various charts are generated such as: 35 | 36 | - messages by date 37 | - messages by day of week/time of day 38 | - commonly used messages/words 39 | - most active threads 40 | - time spent by OS/location/device 41 | - most used reactions 42 | - game play count 43 | 44 | Other miscellaneous data is also displayed such as: 45 | 46 | - total message count 47 | - average words per message 48 | - average messages per day 49 | - total sessions, average session length 50 | - total reactions added/removed 51 | - total voice channel joins 52 | 53 | Human-readable versions of each message thread are also generated in `output/prettified`. 54 | 55 | # Requesting your data 56 | You can retrieve your past Discord messages by following the instructions in the article below. 57 | https://support.discordapp.com/hc/en-us/articles/360004027692 58 | 59 | ### Activity Data 60 | Many of the generated charts/analyses rely on activity data provided in the data backup, which not every user may have. My hypothesis is that this data is only generated if the user has toggled the `Use data to improve Discord` setting under `Privacy & Safety` in the client settings. If this data is not present, the corresponding charts/information will not appear. 61 | 62 | # Event Types 63 | Given that there is no documented list of possible `event_types`s, the repo contains a `event_list.txt` file that contains every `event_type` seen so far. Running the app with the `--verify-events` flag will check the data backup against `event_list.txt` and display any events missing. If there events are of interest, we should parse them, and re-run the app with `--update-events` to add the new events to `event_list.txt`. 64 | -------------------------------------------------------------------------------- /app.rb: -------------------------------------------------------------------------------- 1 | require_relative 'src/analyzers/messages_analyzer' 2 | require_relative 'src/analyzers/activity_analyzer' 3 | require_relative 'src/analyzers/account_analyzer' 4 | require_relative 'src/utils' 5 | require_relative 'src/arg_parser' 6 | require_relative 'src/result_renderer' 7 | require 'time' 8 | require 'erb' 9 | class DiscordDataParser 10 | def initialize 11 | @params = ArgParser.parse(ARGV) 12 | if defined?(Ocra) 13 | @params[:quick_run] = true # ocra only runs app to check for dependencies, no need for full parse 14 | data_path = './data'.freeze 15 | elsif @params[:data_path].nil? 16 | puts 'Defaulting to data directory ./' 17 | data_path = './'.freeze 18 | else 19 | data_path = @params[:data_path].gsub("\\", "\/") 20 | end 21 | messages_path = "#{data_path}/messages" 22 | activity_path = "#{data_path}/activity/analytics" 23 | account_path = "#{data_path}/account" 24 | @activity_analyzer = ActivityAnalyzer.new(activity_path, @params) 25 | @message_analyzer = MessagesAnalyzer.new(messages_path, @params, @activity_analyzer) 26 | @account_analyzer = AccountAnalyzer.new(account_path, @params) 27 | end 28 | 29 | def call 30 | if @params[:rebuild_binary] 31 | exec 'ocra app.rb public/ --output bin/app.exe --gem-all --dll ruby_builtin_dlls\libssp-0.dll --dll ruby_builtin_dlls\libgmp-10.dll --dll ruby_builtin_dlls\libgcc_s_seh-1.dll --dll ruby_builtin_dlls\libwinpthread-1.dll' 32 | puts 'Binary Updated' 33 | return 34 | end 35 | 36 | generate_output_directory 37 | if @params[:verify_events] || @params[:update_events] 38 | analyzers = [@activity_analyzer] 39 | else 40 | analyzers = [@activity_analyzer, @message_analyzer, @account_analyzer] 41 | end 42 | final_output = analyzers.map(&:call).each_with_object(output_files: [], misc_data: {}, output_data: {}) do |output, total| 43 | total[:output_files] += output[:output_files] || [] 44 | total[:misc_data].merge! (output[:misc_data] || {}) 45 | total[:output_data].merge!(output[:output_data] || {}) 46 | end 47 | final_output[:output_data][:utc_offset] = Utils.zone_offset_to_utc_offset(Time.zone_offset(Utils.timezone(@params))) 48 | 49 | FileUtils.cp(final_output[:misc_data][:avatar_path], './output/visualizations/avatar.png') 50 | ResultRenderer.new(final_output, @activity_analyzer.output_available).render 51 | Utils.open_html_graphs 52 | end 53 | 54 | def generate_output_directory 55 | FileUtils.mkdir_p './output/visualizations' 56 | FileUtils.cp(File.expand_path('public/index.css', __dir__), './output/visualizations/index.css') 57 | FileUtils.cp(File.expand_path('public/favicon.ico', __dir__), './output/visualizations/favicon.ico') 58 | end 59 | end 60 | 61 | if $PROGRAM_NAME == __FILE__ 62 | begin 63 | DiscordDataParser.new.call 64 | rescue StandardError => e 65 | puts e.to_s 66 | end 67 | end 68 | -------------------------------------------------------------------------------- /event_examples/accepted_instant_invite.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.153.0","channel":"139615393537851392","user_day":"187","location":"Desktop Invite Modal","custom":true,"timestamp":"2016-08-01T05:36:38.000Z","user_guilds":"6","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":"0","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","invite":"pokemon-go","country_code":"CA","release_channel":"stable","event_type":"accepted_instant_invite","region_code":"ON","client_version":"0.0.294","event_id":"AQIDSt/UooP88BBt3swRoFjxLgAAAAA=","day":"187","time_zone":"America/Toronto","guild":"139615393537851392"} -------------------------------------------------------------------------------- /event_examples/ack_messages.json: -------------------------------------------------------------------------------- 1 | {"city":"Guelph","ip":"206.174.179.0","timestamp":"2016-12-09T05:18:10.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"ack_messages","region_code":"ON","client_version":"0.0.296","event_id":"AQIDGNeE+kHislDMiOlm/lnHWQAAAAA=","day":"317","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/activity_updated.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.231.0","timestamp":"2017-12-14T01:28:59.240Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","has_join_secret":true,"client_send_timestamp":"1513214940953","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","has_spectate_secret":true,"country_code":"CA","freight_hostname":"api-prd-main-dhh1","client_track_timestamp":"1513214940946","release_channel":"stable","event_type":"activity_updated","region_code":"ON","client_version":"0.0.299","has_images":true,"party_max":"3","has_match_secret":true,"event_id":"AQMD05nS25rlPN1Icm5yf8rwNgAAAFs=","day":"686","time_zone":"America/Toronto","application_id":"367827983903490050"} -------------------------------------------------------------------------------- /event_examples/add_channel_recipient.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.231.0","timestamp":"2017-11-12T01:10:43.558Z","chosen_locale":"en-US","os_version":"10.0.15063","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-0m9g","channel_id":"379075505896292353","release_channel":"stable","event_type":"add_channel_recipient","region_code":"ON","client_version":"0.0.298","event_id":"AQED5ASI3ftOt6UPDOuSOHc2RgCrPls=","day":"654","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/add_reaction.json: -------------------------------------------------------------------------------- 1 | {"city":"Guelph","ip":"206.174.179.0","timestamp":"2016-11-03T23:18:56.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","emoji_name":"????","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","message_id":"243876676403068928","channel_id":"230509465533677568","release_channel":"stable","event_type":"add_reaction","region_code":"ON","client_version":"0.0.296","event_id":"AQIDIql2y9s+rJ+dY+HK01FswAAAAAA=","day":"281","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/af_exited.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","num_cards_viewed":0,"timestamp":"2018-07-24T04:26:51.192Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":19535,"client_send_timestamp":"1532406411033","seconds_spent":1,"os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-lnwl","num_cards_total":29,"cfduid":"d3f5b98f58108f09af51a742142948b741532405861","event_source":"client","client_track_timestamp":"1532406410883","release_channel":"stable","event_type":"af_exited","game_ids_viewed":[],"load_id":"0982dc0c-66fa-4243-8db0-98e9b877aa2c","region_code":"CA","client_version":"0.0.301","num_games_viewed":0,"event_id":"AQMDStD9YPcq+1LmYqyh5An+tQAAAB0=","day":"909","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/af_loaded.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","num_users_subscribed":116,"num_game_parties_solo":12,"timestamp":"2018-07-02T03:40:39.138Z","chosen_locale":"en-US","os_version":"10.0.16299","num_cards_game_playable":0,"browser":"Discord Client","domain":"Analytics","num_cards_visible":4,"client_build_number":18043,"client_send_timestamp":"1530502843132","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","num_cards_game_news":6,"num_game_parties_voice":1,"country_code":"US","num_game_parties_recently_played":58,"freight_hostname":"api-prd-main-vmv2","cfduid":"d1a1dbbad1cdd134839bf2cc6a395aac31530502836","window_width":1922,"num_game_parties_collapsed":11,"event_source":"client","client_track_timestamp":"1530502843102","release_channel":"stable","event_type":"af_loaded","load_id":"34944c86-8ffd-486b-8163-fc495715169d","num_game_parties":12,"region_code":"CA","game_ids":["356869127241072640","356887282982191114","432980957394370572","356888453796986880","358425800766128128","356873622985506820","356876590342340608","356877880938070016","367827983903490050","356875570916753438","359510095811444736","356875057940791296","356875221078245376","357607133254254632","363409179668512788","363413961967927306","359509332490059776","421150682347732992","356875988589740042","356889262362329098","356876176465199104","359509387670192128","356875890958925834","451561653570502656","363409615620407316","363427270024626176","454814894596816907","425438403819995145","428052640740540416","425440642173239296"],"client_version":"0.0.301","num_game_parties_rich_presence":7,"window_height":1040,"num_cards":38,"event_id":"AQMDDwP5I6t2aCLgdGfCymhRngAAAAE=","day":"887","time_zone":"America/Los_Angeles","num_launcher_applications":5} -------------------------------------------------------------------------------- /event_examples/af_viewed.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","timestamp":"2018-07-16T01:19:08.973Z","chosen_locale":"en-US","os_version":"10.0.17134","browser":"Discord Client","domain":"Analytics","client_build_number":18830,"client_send_timestamp":"1531703948191","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-hb2k","cfduid":"d24252b478f97aecf0aa1e79cc5dda9b71531703936","event_source":"client","client_track_timestamp":"1531703947352","release_channel":"stable","event_type":"af_viewed","region_code":"CA","client_version":"0.0.301","event_id":"AQMDSM/p6E9uf0iKaac21nB+QwAAAAA=","day":"900","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/app_opened.json: -------------------------------------------------------------------------------- 1 | {"opened_from":"launcher","city":"Toronto","ip":"209.171.88.0","timestamp":"2017-08-29T22:05:37.102Z","chosen_locale":"en-US","os_version":"7.1.2","browser":"Discord Android","domain":"Analytics","os":"Android","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-xrmd","event_type":"app_opened","region_code":"ON","client_version":"502","os_sdk_version":"25","event_id":"AQEDGN9MyawcqWbs/uC90OYXOwGX5A4=","day":"580","time_zone":"America/Toronto","device":"Pixel XL, marlin"} -------------------------------------------------------------------------------- /event_examples/application_assets_enabled.json: -------------------------------------------------------------------------------- 1 | {"referring_domain_current":"www.google.ca","search_engine_current":"google","city":"Waterloo","ip":"45.62.218.0","referring_domain":"www.dynobot.net","timestamp":"2018-04-17T20:30:50.917Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","referrer_current":"https://www.google.ca/","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-jvbs","cfduid":"dbad100baf30986f05008c1f412426b141521498835","event_source":"api","release_channel":"stable","event_type":"application_assets_enabled","region_code":"ON","referrer":"https://www.dynobot.net/","event_id":"AQEDMIoG8pzlDj5NJuMIp9aQSgDpgzU=","day":"811","time_zone":"America/Toronto","application_id":"265578069216067595"} -------------------------------------------------------------------------------- /event_examples/application_created.json: -------------------------------------------------------------------------------- 1 | {"city":"Guelph","name":"testbot","ip":"206.174.179.0","timestamp":"2017-05-18T21:38:14.000Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"application_created","region_code":"ON","event_id":"AQIDSMcKzfPHcL4z37sxX1BH3QAAAAA=","day":"477","time_zone":"America/Toronto","application_id":"314879381824733186"} -------------------------------------------------------------------------------- /event_examples/application_updated.json: -------------------------------------------------------------------------------- 1 | {"referring_domain_current":"www.google.ca","search_engine_current":"google","city":"Waterloo","name":"Umi","ip":"45.62.218.0","referring_domain":"www.dynobot.net","icon_hash":"dc1fbfadb61f5a4f259ed5ecd5895a2f","timestamp":"2018-04-17T20:30:35.965Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","referrer_current":"https://www.google.ca/","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-cws3","cfduid":"dbad100baf30986f05008c1f412426b141521498835","event_source":"api","release_channel":"stable","event_type":"application_updated","region_code":"ON","referrer":"https://www.dynobot.net/","event_id":"AQEDVW9hCYi1rsbhoU9weWLkHQDZ2sk=","day":"811","time_zone":"America/Toronto","application_id":"265578069216067595"} -------------------------------------------------------------------------------- /event_examples/authorize_login_location.json: -------------------------------------------------------------------------------- 1 | {"city":"Edison","ip":"64.64.117.0","timestamp":"2017-05-09T17:15:25.000Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","event_type":"authorize_login_location","authorized_ip":"64.64.117.0","region_code":"NJ","event_id":"AQID5mHQ8F6VSq7YLCtnc8YYPwAAAAA=","day":"468","time_zone":"America/New_York"} -------------------------------------------------------------------------------- /event_examples/authorized_app_connected.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.231.0","timestamp":"2017-12-27T03:59:05.194Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_send_timestamp":"1514347145342","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","transport":"ws","freight_hostname":"api-prd-main-vk5l","client_track_timestamp":"1514347145341","release_channel":"stable","event_type":"authorized_app_connected","region_code":"ON","client_version":"0.0.299","event_id":"AQMDJ92BH3OEBN3MDmd0v/xRYAAABBA=","day":"700","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/change_log_closed.json: -------------------------------------------------------------------------------- 1 | {"city":"Guelph","ip":"206.174.179.0","timestamp":"2016-09-09T01:45:49.000Z","max_scrolled_percentage":0.0,"chosen_locale":"en-US","seconds_open":488.0,"os_version":"10.0.10240","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"change_log_closed","region_code":"ON","client_version":"0.0.295","event_id":"AQID8USAE2VEZPy+yGHOAjuakwAAAAA=","day":"225","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/change_log_opened.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.225.0","timestamp":"2016-12-23T03:31:42.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"change_log_opened","region_code":"ON","client_version":"0.0.296","event_id":"AQIDD3LJCbWzyF3ts363tSKftQAAAAA=","day":"331","time_zone":"America/Toronto","change_log_id":"2016-12-22:1"} -------------------------------------------------------------------------------- /event_examples/channel_notice_closed.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"139535085769719809","city":"Waterloo","ip":"129.97.124.0","channel_size_online":13,"channel_member_perms":"2146958591","timestamp":"2017-05-16T16:30:02.000Z","guild_num_text_channels":15,"guild_is_vip":false,"chosen_locale":"en-US","os_version":"10.0.14393","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":0,"variant":"a","user_id":"141734249702096896","guild_size_total":37,"detected_locale":"en-US","country_code":"CA","channel_hidden":false,"guild_num_roles":34,"guild_num_voice_channels":11,"channel_id":"139535085769719809","release_channel":"stable","event_type":"channel_notice_closed","guild_member_perms":"2146958591","region_code":"ON","client_version":"0.0.297","guild_member_num_roles":4,"guild_num_channels":26,"notice_type":"QUICKSWITCHER","event_id":"AQID0Q1hsr0xZd7O3OfipcF1RAAAAAA=","day":"475","time_zone":"America/Toronto","channel_size_total":0} -------------------------------------------------------------------------------- /event_examples/channel_notice_viewed.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"260272353118912522","city":"Waterloo","ip":"129.97.124.0","channel_size_online":115,"channel_member_perms":"1177930817","timestamp":"2017-06-15T17:40:23.000Z","guild_num_text_channels":6,"guild_is_vip":false,"chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","channel_type":0,"variant":"a","user_id":"141734249702096896","guild_size_total":924,"detected_locale":"en-US","country_code":"CA","channel_hidden":true,"guild_num_roles":13,"guild_num_voice_channels":2,"channel_id":"260272353118912522","event_type":"channel_notice_viewed","guild_member_perms":"1177930817","region_code":"ON","guild_member_num_roles":1,"guild_num_channels":10,"notice_type":"QUICKSWITCHER","event_id":"AQIDyu5irYt7uT1y7oK4LqEB1wAAAAA=","day":"505","time_zone":"America/Toronto","channel_size_total":0} -------------------------------------------------------------------------------- /event_examples/channel_opened.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"260272353118912522","city":"Kitchener","ip":"174.115.198.0","channel_member_perms":"1177930817","timestamp":"2018-03-05T23:47:18.378Z","guild_num_text_channels":11,"guild_is_vip":false,"chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_send_timestamp":"1520293639247","os":"Windows","channel_type":0,"user_id":"141734249702096896","guild_size_total":2024,"detected_locale":"en-US","country_code":"CA","channel_hidden":false,"guild_num_roles":23,"freight_hostname":"api-prd-main-ns2d","cfduid":"d313849894eac162a94acd5582d97247e1514909992","guild_num_voice_channels":3,"event_source":"client","channel_id":"260449769606873088","client_track_timestamp":"1520293639133","release_channel":"stable","event_type":"channel_opened","guild_member_perms":"1177930817","region_code":"ON","client_version":"0.0.300","guild_member_num_roles":3,"guild_num_channels":17,"event_id":"AQMDFFQkT6Q4fqLURMtvMIfJ6gAAAK8=","day":"768","time_zone":"America/Toronto","channel_size_total":0} -------------------------------------------------------------------------------- /event_examples/claim_account.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"129.97.131.0","timestamp":"2016-01-27T02:41:18.000Z","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","event_type":"claim_account","region_code":"ON","event_id":"AQID575Coqh2dzrkoTDxgZhoGwAAAAA=","day":"0","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/click_landing_cta.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"192.171.48.0","referring_domain":"www.google.ca","timestamp":"2016-02-14T20:54:30.000Z","search_engine":"google","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","buttontype":"Hero CTA","user_id":"141734249702096896","country_code":"CA","event_type":"click_landing_cta","buttonstate":"has session","region_code":"ON","referrer":"https://www.google.ca/","marketing_variant":"b","event_id":"AQIDKNd3MEtl74jbZgPj5tkpUQAAAAA=","day":"18","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/close_tutorial.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"129.97.131.0","timestamp":"2016-01-29T03:08:09.000Z","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","acknowledged":true,"user_id":"141734249702096896","tutorial":"voice-conversations","country_code":"CA","event_type":"close_tutorial","region_code":"ON","event_id":"AQIDAGzSTrNKJ3zKeJyBEt/ZBgAAAAA=","day":"2","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/connected_account_initiated.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.253.0","location":"Friends List","timestamp":"2018-03-30T22:09:27.712Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":12477,"client_send_timestamp":"1522447768160","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-ttv3","platform_type":"facebook","cfduid":"dc96bd3a4a3fe0be512b241e5cf1fce831493587411","event_source":"client","client_track_timestamp":"1522447768159","release_channel":"stable","event_type":"connected_account_initiated","region_code":"ON","client_version":"0.0.300","event_id":"AQMDN/Y/yfLuCbOW4qWrEWLYCAAAAKs=","day":"793","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/connected_account_viewed.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","timestamp":"2018-06-13T15:18:59.183Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":16727,"client_send_timestamp":"1528903140305","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-8qvl","platform_type":"twitter","cfduid":"d2af0d96a370d7770c5289149339d4e271528902271","event_source":"client","client_track_timestamp":"1528903140304","release_channel":"stable","event_type":"connected_account_viewed","region_code":"CA","client_version":"0.0.301","event_id":"AQMDBqu3GEac6YoGP2H9GFkTCwAAAEk=","day":"868","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/copy_instant_invite.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.153.0","channel":"214171894071558146","server":"214171894071558146","timestamp":"2016-08-14T00:51:59.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"copy_instant_invite","region_code":"ON","client_version":"0.0.295","event_id":"AQIDqOgFaciYcBmofejdCXdpVgAAAAA=","day":"199","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/create_channel.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.231.0","timestamp":"2017-11-12T01:10:43.557Z","chosen_locale":"en-US","os_version":"10.0.15063","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":3,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-0m9g","channel_id":"379075505896292353","release_channel":"stable","event_type":"create_channel","region_code":"ON","client_version":"0.0.298","event_id":"AQED5ASI3ftOt6UPDOuSOHc2RgCrPlk=","day":"654","time_zone":"America/Toronto","origin_channel_id":"142892278459924481"} -------------------------------------------------------------------------------- /event_examples/create_emoji.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"139535085769719809","city":"Waterloo","ip":"129.97.124.0","timestamp":"2016-09-27T12:13:11.000Z","chosen_locale":"en-US","os_version":"10.0.10240","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"create_emoji","region_code":"ON","client_version":"0.0.295","event_id":"AQID+alAkL0yVHB17zwKbYdPXwAAAAA=","day":"244","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/create_guild.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"196309256058699776","city":"Toronto","ip":"45.72.224.0","timestamp":"2016-06-25T17:02:53.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"create_guild","region_code":"ON","client_version":"0.0.291","event_id":"AQIDYVxwm5BV66mN0Ny+SB3aegAAAAA=","day":"150","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/create_instant_invite.json: -------------------------------------------------------------------------------- 1 | {"city":"Guelph","ip":"206.174.179.0","location":"InstantInviteModal Mount","timestamp":"2016-10-30T15:39:48.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","temporary":false,"os":"Windows","max_uses":"0","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","code":"6TjVT","country_code":"CA","release_channel":"stable","event_type":"create_instant_invite","max_age":"1800","regenerate":false,"region_code":"ON","client_version":"0.0.296","event_id":"AQIDcViZrm+aXm+Ukk2llxboHAAAAAA=","day":"277","time_zone":"America/Toronto","unique":false} -------------------------------------------------------------------------------- /event_examples/create_oauth2_application.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.224.0","referring_domain":"www.google.ca","timestamp":"2016-06-25T05:02:59.000Z","search_engine":"google","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"create_oauth2_application","region_code":"ON","referrer":"https://www.google.ca/","event_id":"AQIDSFhpgKs4Cd9eh50AOVh/5AAAAAA=","day":"150","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/data_request_initiated.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","timestamp":"2018-07-29T17:37:43.249Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":20174,"os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-9t30","cfduid":"dc74a94aeb9e75295cb6a8e84a9dc82ba1532885839","event_source":"api","release_channel":"stable","event_type":"data_request_initiated","harvest_id":"473182317502791680","region_code":"CA","client_version":"0.0.301","event_id":"AQEDyIJJd3S+454dbz0XdV9S2wT0HvE=","day":"914","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/delete_emoji.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"139535085769719809","city":"Guelph","ip":"206.174.179.0","timestamp":"2016-09-27T16:50:07.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"delete_emoji","region_code":"ON","client_version":"0.0.296","event_id":"AQIDXMjdsivn7kTCjEWCTVlWhwAAAAA=","day":"244","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/delete_guild.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"167096303946301440","city":"Waterloo","ip":"129.97.131.0","timestamp":"2016-04-06T02:21:15.000Z","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","event_type":"delete_guild","region_code":"ON","event_id":"AQIDrk+cCD72qBucFwYeMf6FVAAAAAA=","day":"69","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/detect_platform_account.json: -------------------------------------------------------------------------------- 1 | {"display_type":"NOTICE","city":"Toronto","ip":"108.161.120.0","timestamp":"2016-09-07T04:01:59.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","platform_type":"skype","release_channel":"stable","event_type":"detect_platform_account","region_code":"ON","client_version":"0.0.296","event_id":"AQIDo7e6TAeDgFHJuaN0qYZHDQAAAAA=","day":"224","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/download_app.json: -------------------------------------------------------------------------------- 1 | {"ptb":false,"city":"Waterloo","ip":"129.97.131.0","timestamp":"2016-01-30T21:58:15.000Z","has_e_mail":true,"released":true,"browser":"Discord Client","referring_location":"Links","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","event_type":"download_app","region_code":"ON","platform":"PC","event_id":"AQIDl9SULmR7OJSyg0Ma0AZBuAAAAAA=","day":"3","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/enable_notifications.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"65.110.210.0","source":"UserSettingsModal","timestamp":"2017-02-14T00:24:47.000Z","chosen_locale":"en-US","os_version":"10.0.14393","browser":"Discord Client","domain":"Analytics","enabled":true,"os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"enable_notifications","region_code":"ON","client_version":"0.0.297","event_id":"AQIDGQl1ivLA+76L1v5bkR5gUgAAAAA=","day":"383","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/experiment_guild_triggered.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"208436903735853057","city":"Toronto","name":"search_experiment_guild","ip":"45.72.225.0","timestamp":"2016-12-23T05:34:12.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","revision":1,"release_channel":"stable","event_type":"experiment_guild_triggered","bucket":0,"region_code":"ON","client_version":"0.0.296","event_id":"AQIDxdjlqFiTLF62C7h+uSBUcgAAAAA=","day":"331","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/experiment_user_triggered.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","name":"search_experiment_dm","ip":"45.72.225.0","timestamp":"2016-12-23T03:31:42.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","revision":1,"release_channel":"stable","event_type":"experiment_user_triggered","bucket":0,"region_code":"ON","client_version":"0.0.296","event_id":"AQIDT3JWme7BWX07QqCNrKBE+wAAAAA=","day":"331","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/footer_navigation.json: -------------------------------------------------------------------------------- 1 | {"linkclicked":"android","city":"Waterloo","ip":"129.97.131.0","timestamp":"2016-03-29T15:45:23.000Z","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","event_type":"footer_navigation","region_code":"ON","marketing_variant":"b","event_id":"AQIDlTRRbPZJtKa6uKm+/oFSBwAAAAA=","day":"62","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/friend_request_failed.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"216.13.135.0","referring_domain":"www.google.ca","location":"Add Friend","timestamp":"2016-07-05T17:06:15.000Z","search_engine":"google","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","reason":"User not found","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"friend_request_failed","region_code":"ON","referrer":"https://www.google.ca/","event_id":"AQIDS6bTTMDAPiOpW3WD/PTOpgAAAAA=","day":"160","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/friends_list_viewed.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.231.0","timestamp":"2017-12-16T22:48:12.306Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_send_timestamp":"1513464492156","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-cvq1","tab_opened":"ONLINE","client_track_timestamp":"1513464492116","release_channel":"stable","event_type":"friends_list_viewed","region_code":"ON","client_version":"0.0.299","event_id":"AQMDkTqPrZTjVTjExQPi6bQ7DQAAAFo=","day":"689","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/game_news_changed.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","location":"Activity Feed","timestamp":"2018-06-23T19:47:23.722Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":17612,"client_send_timestamp":"1529783243405","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-dx8z","cfduid":"d944c5343955c7d0a6e2c9501718879c51529782387","event_source":"client","client_track_timestamp":"1529783243078","release_channel":"stable","event_type":"game_news_changed","load_id":"34bf0eed-9239-41a3-ae86-2d3feb7dde25","region_code":"CA","client_version":"0.0.301","change_count":3,"event_id":"AQMDRkQrZurWuqVaVkTKfouYWwAAAN0=","day":"878","time_zone":"America/Los_Angeles","af_news":true} -------------------------------------------------------------------------------- /event_examples/game_opened.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"45.62.218.0","source":"Game Modal","timestamp":"2018-03-20T04:08:39.820Z","game_id":"356869127241072640","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":12336,"client_send_timestamp":"1521518920659","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-1133","cfduid":"d313849894eac162a94acd5582d97247e1514909992","event_source":"client","client_track_timestamp":"1521518920654","release_channel":"stable","event_type":"game_opened","game_name":"League of Legends","region_code":"ON","client_version":"0.0.300","type":"launch","event_id":"AQMDBTQSE3G8PyuTvm7TH+JhPAAAAH4=","day":"783","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/guild_settings_opened.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"139535085769719809","city":"Guelph","settings_version":"modal","ip":"206.174.179.0","channel_size_online":12,"channel_member_perms":"2146958591","timestamp":"2017-04-30T19:57:38.000Z","guild_num_text_channels":15,"guild_is_vip":false,"chosen_locale":"en-US","os_version":"10.0.14393","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":0,"variant":"a","user_id":"141734249702096896","guild_size_total":37,"detected_locale":"en-US","country_code":"CA","channel_hidden":false,"guild_num_roles":34,"guild_num_voice_channels":10,"channel_id":"139535085769719809","release_channel":"stable","event_type":"guild_settings_opened","guild_member_perms":"2146958591","region_code":"ON","client_version":"0.0.297","guild_member_num_roles":4,"guild_num_channels":25,"event_id":"AQID8yj3nBEbvRaevGZsFN6ZRAAAAAA=","day":"459","time_zone":"America/Toronto","channel_size_total":0} -------------------------------------------------------------------------------- /event_examples/guild_viewed.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"139535085769719809","city":"Toronto","ip":"45.72.231.0","channel_member_perms":"2146958591","timestamp":"2017-12-11T02:40:03.344Z","guild_num_text_channels":10,"guild_is_vip":false,"chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_send_timestamp":"1512960003696","os":"Windows","channel_type":0,"user_id":"141734249702096896","guild_size_total":23,"detected_locale":"en-US","country_code":"CA","channel_hidden":false,"guild_num_roles":27,"freight_hostname":"api-prd-main-qsq8","guild_num_voice_channels":3,"channel_id":"139535085769719809","client_track_timestamp":"1512960003649","release_channel":"stable","event_type":"guild_viewed","guild_member_perms":"2146958591","region_code":"ON","client_version":"0.0.298","guild_member_num_roles":4,"guild_num_channels":13,"event_id":"AQMDTfZAixBs6UCP/s+RMnKpyQAAAfQ=","day":"683","time_zone":"America/Toronto","channel_size_total":0} -------------------------------------------------------------------------------- /event_examples/hook_result.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","success":true,"timestamp":"2018-06-24T04:07:24.439Z","game_id":"356869127241072640","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":17612,"client_send_timestamp":"1529813244290","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-mj5s","cfduid":"d84f79e30176e0799f5f625909af1cd681529813169","event_source":"client","client_track_timestamp":"1529813244289","release_channel":"stable","event_type":"hook_result","game_name":"League of Legends","region_code":"CA","client_version":"0.0.301","event_id":"AQMDRkQrZurWuqVaVkTKfouYWwAAAZc=","day":"879","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/ignore_platform_account.json: -------------------------------------------------------------------------------- 1 | {"display_type":"MODAL","city":"Toronto","ip":"108.161.120.0","timestamp":"2016-09-07T04:02:35.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","platform_type":"skype","release_channel":"stable","event_type":"ignore_platform_account","region_code":"ON","client_version":"0.0.296","event_id":"AQIDoVu0EIQCCf0chhLSyRHCVgAAAAA=","day":"224","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/input_mute.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"69.196.128.0","timestamp":"2016-04-29T03:10:29.000Z","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","event_type":"input_mute","region_code":"ON","event_id":"AQIDbPrOhUQbPxWZBOGg/2aXYQAAAAA=","day":"93","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/input_unmute.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"108.161.119.0","timestamp":"2016-05-15T22:05:54.000Z","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","event_type":"input_unmute","region_code":"ON","event_id":"AQIDHvChlNu4//DnlebvkD74qwAAAAA=","day":"109","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/invite_app_invoked.json: -------------------------------------------------------------------------------- 1 | {"referring_domain_current":"www.reddit.com","city":"San Francisco","ip":"76.21.57.0","referring_domain":"www.dynobot.net","timestamp":"2018-05-18T14:59:31.736Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","client_build_number":15523,"client_send_timestamp":"1526655571463","os":"Windows","referrer_current":"https://www.reddit.com/r/uwaterloo/comments/8j7xrk/acceptances_megathread_fall_2018_incoming_students/","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-4m5j","cfduid":"d00ed9a6553589e5c1d91c7104f31c75b1526655571","event_source":"client","client_track_timestamp":"1526655571454","release_channel":"stable","event_type":"invite_app_invoked","invite_code":"fnb8y3","region_code":"CA","referrer":"https://www.dynobot.net/","event_id":"AQED8viTb+vTXaNUai1t8OtmUQDlLjw=","day":"842","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/invite_opened.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"45.62.218.0","timestamp":"2017-07-14T20:08:07.000Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"invite_opened","invite_code":"0xZXblUU30hYo1vJ","region_code":"ON","load_time":"2125","event_id":"AQIDagXiu60WeB31LDDojzPclwAAAAA=","day":"534","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/invite_sent.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"260272353118912522","city":"Toronto","ip":"45.72.231.0","location":"chat_input","channel_member_perms":"1177930817","timestamp":"2017-12-10T02:10:07.366Z","guild_num_text_channels":9,"guild_is_vip":false,"chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_send_timestamp":"1512871806911","os":"Windows","channel_type":0,"user_id":"141734249702096896","guild_size_total":1719,"detected_locale":"en-US","country_code":"CA","channel_hidden":true,"guild_num_roles":22,"freight_hostname":"api-prd-main-11bx","message_id":"389237313592623104","guild_num_voice_channels":3,"channel_id":"260272353118912522","client_track_timestamp":"1512871806889","release_channel":"stable","event_type":"invite_sent","guild_member_perms":"1177930817","invite_code":"DZPdph","region_code":"ON","client_version":"0.0.298","guild_member_num_roles":3,"guild_num_channels":15,"event_id":"AQMDwcnq6hliyvA1ATAk9duhUQAAAGM=","day":"682","time_zone":"America/Toronto","channel_size_total":0} -------------------------------------------------------------------------------- /event_examples/invite_suggestion_opened.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"196309256058699776","city":"San Francisco","ip":"76.21.57.0","location":"Context Menu","num_suggestions":"137","timestamp":"2018-07-04T23:36:05.121Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":18043,"client_send_timestamp":"1530747366227","os":"Windows","num_friends":"46","user_id":"141734249702096896","detected_locale":"en-US","num_group_dms":"16","country_code":"US","freight_hostname":"api-prd-main-r08v","cfduid":"d1d4e645595862b8a4e3fd785473d80311530746252","event_source":"client","client_track_timestamp":"1530747366216","release_channel":"stable","event_type":"invite_suggestion_opened","region_code":"CA","client_version":"0.0.301","num_dms":"75","event_id":"AQMDHdzl8YtcIkzBeIWh4ObcGgAAAJg=","day":"889","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/invite_viewed.json: -------------------------------------------------------------------------------- 1 | {"referring_domain_current":"www.reddit.com","city":"San Francisco","ip":"76.21.57.0","referring_domain":"www.dynobot.net","timestamp":"2018-05-18T14:59:31.458Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","client_build_number":15523,"client_send_timestamp":"1526655571163","os":"Windows","referrer_current":"https://www.reddit.com/r/uwaterloo/comments/8j7xrk/acceptances_megathread_fall_2018_incoming_students/","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-63sl","cfduid":"d00ed9a6553589e5c1d91c7104f31c75b1526655571","event_source":"client","client_track_timestamp":"1526655571163","release_channel":"stable","event_type":"invite_viewed","region_code":"CA","referrer":"https://www.dynobot.net/","event_id":"AQEDjjgGqH1e+yE21MT2vyYAhwDaQOo=","day":"842","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/join_call.json: -------------------------------------------------------------------------------- 1 | {"ip":"10.10.0.0","timestamp":"2016-12-21T01:41:23.000Z","chosen_locale":"en-US","domain":"Analytics","channel_type":3,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","message_id":"260944766441619458","channel_id":"260944766454333440","event_type":"join_call","event_id":"AQIDVKzL5YwUMQstnKkSBw9Q1gAAAAA=","day":"328"} -------------------------------------------------------------------------------- /event_examples/join_experiment.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","name":"2363164837","ip":"129.97.124.0","timestamp":"2016-09-19T16:16:56.000Z","chosen_locale":"en-US","os_version":"10.0.10240","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","revision":0,"release_channel":"stable","event_type":"join_experiment","bucket":1,"region_code":"ON","client_version":"0.0.295","event_id":"AQIDllxgP++fAm7yxJjeEqOp6gAAAAA=","day":"236","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/join_voice_channel.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"139535085769719809","city":"Guelph","ip":"206.174.179.0","voice_state_count":"1","timestamp":"2016-10-23T22:40:05.000Z","nonce":"17633137-3f9b-4d9b-8370-a9ed6a84a97f","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":2,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","channel_id":"139546661486723073","release_channel":"stable","event_type":"join_voice_channel","region_code":"ON","client_version":"0.0.296","event_id":"AQIDsZrOah7zGcI92rL+X3Xz7wAAAAA=","day":"270","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/joined_integration.json: -------------------------------------------------------------------------------- 1 | {"city":"Guelph","ip":"206.174.179.0","user_day":"272","timestamp":"2016-10-25T04:35:56.000Z","user_guilds":"10","chosen_locale":"en-US","integration":"104966375193190400","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","integration_type":"twitch","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"joined_integration","region_code":"ON","client_version":"0.0.296","event_id":"AQID7++DLDg3laZj3/2WTA2UAwAAAAA=","day":"272","time_zone":"America/Toronto","guild":"103612967911718912"} -------------------------------------------------------------------------------- /event_examples/jump.json: -------------------------------------------------------------------------------- 1 | {"city":"Ho Chi Minh City","ip":"113.173.163.0","timestamp":"2016-08-28T23:19:46.000Z","chosen_locale":"en-US","os_version":"10.0.10240","browser":"Discord Client","domain":"Analytics","context":"Present","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"VN","channel_id":"169058998878732288","release_channel":"stable","event_type":"jump","region_code":"SG","client_version":"0.0.295","event_id":"AQIDQMk06IWp4BtYK+X6LXtpGgAAAAA=","day":"214","time_zone":"Asia/Ho_Chi_Minh"} -------------------------------------------------------------------------------- /event_examples/launch_game.json: -------------------------------------------------------------------------------- 1 | {"city":"Guelph","ip":"206.174.179.0","timestamp":"2016-11-04T22:01:23.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"launch_game","region_code":"ON","client_version":"0.0.296","game":"shitty matlab","event_id":"AQIDpC07BsFzhjf4cuyAUtnHkQAAAAA=","day":"282","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/leave_guild.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"125440014904590336","city":"Waterloo","ip":"129.97.131.0","timestamp":"2016-04-19T02:18:59.000Z","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","event_type":"leave_guild","region_code":"ON","event_id":"AQIDcuEIsMJmwKocE9NVcMBGMwAAAAA=","day":"82","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/leave_voice_channel.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"211956402531336193","duration":"133033","city":"Toronto","ip":"45.72.153.0","voice_state_count":"1","timestamp":"2016-08-08T02:34:37.000Z","nonce":"1af3136f-a8f3-4a33-910f-5302bcdf7cbd","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":2,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","channel_id":"211956402531336195","release_channel":"stable","event_type":"leave_voice_channel","region_code":"ON","client_version":"0.0.295","event_id":"AQIDEFy2tnKO9XAykaKZ7N3rSAAAAAA=","day":"193","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/local_settings_updated.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"76.10.161.0","timestamp":"2017-10-17T22:49:50.155Z","chosen_locale":"en-US","os_version":"8.0.0","browser":"Discord Android","domain":"Analytics","os":"Android","variant":"a","notifications_enabled":false,"user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-lxzf","event_type":"local_settings_updated","region_code":"ON","client_version":"538","os_sdk_version":"26","event_id":"AQED1mqUYqOpCcSMg783k7obcgDWr04=","day":"629","time_zone":"America/Toronto","device":"Pixel XL, marlin"} -------------------------------------------------------------------------------- /event_examples/login_successful.json: -------------------------------------------------------------------------------- 1 | {"city":null,"ip":"206.71.29.0","timestamp":"2017-10-02T13:41:16.259Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Mac OS X","variant":"a","is_new_user":false,"user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-j7ps","event_type":"login_successful","region_code":"WI","event_id":"AQED1ROU4kVvAxVKxTAWjiRSCQA/0qQ=","day":"614","time_zone":"America/Chicago"} -------------------------------------------------------------------------------- /event_examples/login_viewed.json: -------------------------------------------------------------------------------- 1 | {"city":"Anaheim","ip":"172.248.180.0","timestamp":"2018-05-27T14:06:56.939Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":16162,"client_send_timestamp":"1527430015734","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-jgh6","cfduid":"da9aa11edc9554c3f441b976597c258101527430016","event_source":"client","client_track_timestamp":"1527429997183","release_channel":"stable","event_type":"login_viewed","region_code":"CA","client_version":"0.0.301","event_id":"AQMDz+/GSVA881pNk3hv1LvKdgAAAAA=","day":"851","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/main_navigation_menu.json: -------------------------------------------------------------------------------- 1 | {"linkclicked":"download","city":"Toronto","ip":"45.72.224.0","referring_domain":"www.google.ca","timestamp":"2016-06-25T04:58:14.000Z","search_engine":"google","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"main_navigation_menu","region_code":"ON","referrer":"https://www.google.ca/","marketing_variant":"a","event_id":"AQIDUrKxtuf4iJ+TltCPNZIv8AAAAAA=","day":"150","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/message_attachment_updated.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"0","city":"Toronto","ip":"45.72.231.0","source":"media_picker","timestamp":"2017-12-14T23:35:54.452Z","chosen_locale":"en-US","os_version":"8.1.0","browser":"Discord Android","domain":"Analytics","os":"Android","total_attachments":0,"channel_type":1,"user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-sr6t","channel_id":"367514881236271106","mime_type":"image/png","event_type":"message_attachment_updated","region_code":"ON","client_version":"583","os_sdk_version":"27","event_id":"AQEDcXWjh4cHgy2gQKTzBKSHoACS05M=","action_type":0,"day":"687","time_zone":"America/Toronto","device":"Pixel XL, marlin","channel_size_total":1} -------------------------------------------------------------------------------- /event_examples/message_edited.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.225.0","channel":"230509465533677568","emoji_unicode":0,"private":true,"timestamp":"2016-12-23T06:31:05.000Z","emoji_custom":0,"emoji_only":false,"chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":1,"emoji_custom_external":0,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","emoji_managed_external":0,"release_channel":"stable","event_type":"message_edited","emoji_managed":0,"region_code":"ON","client_version":"0.0.296","length":50,"word_count":9,"num_attachments":0,"max_attachment_size":"0","event_id":"AQID4MkJxel+74q/hjIk46DsEwAAAAA=","day":"331","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/mktg_hypesquad_form_opened.json: -------------------------------------------------------------------------------- 1 | {"city":"Guelph","ip":"206.174.179.0","timestamp":"2017-06-15T12:24:08.000Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"mktg_hypesquad_form_opened","region_code":"ON","event_id":"AQIDDUKWHTw/Ibx+fZHw8r/ylwAAAAA=","day":"505","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/mktg_hypesquad_loaded.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"45.62.218.0","timestamp":"2017-06-26T20:11:57.000Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"mktg_hypesquad_loaded","region_code":"ON","event_id":"AQIDFlqsbe61xvL4rDK8NjUnmAAAAAA=","day":"516","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/mktg_page_viewed.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"76.10.161.0","timestamp":"2017-10-26T23:16:16.408Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","page_name":"security","country_code":"CA","freight_hostname":"api-prd-main-w862","event_type":"mktg_page_viewed","region_code":"ON","has_session":true,"marketing_variant":"a","event_id":"AQEDVI1mtDLbzzLXyrAcxB2v8gBXxB4=","day":"638","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/nav_drawer_opened.json: -------------------------------------------------------------------------------- 1 | {"city":"Mississauga","ip":"70.27.101.0","timestamp":"2017-12-31T02:52:38.817Z","chosen_locale":"en-US","os_version":"8.1.0","browser":"Discord Android","domain":"Analytics","os":"Android","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-7rrw","event_type":"nav_drawer_opened","region_code":"ON","client_version":"591","os_sdk_version":"27","event_id":"AQED/RVd5ZnAH+OvcbTR4je5pACBKXg=","day":"704","time_zone":"America/Toronto","device":"Pixel XL, marlin"} -------------------------------------------------------------------------------- /event_examples/new_login_location.json: -------------------------------------------------------------------------------- 1 | {"city":"Oakville","ip":"142.46.208.0","timestamp":"2017-01-09T20:15:07.000Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"new_login_location","region_code":"ON","event_id":"AQIDkUaiKFe3eRsuH8VyCo8ECQAAAAA=","day":"348","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/notification_clicked.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"139535085769719809","city":"Waterloo","ip":"129.97.124.0","notif_type":"MESSAGE_CREATE","timestamp":"2017-07-10T18:34:21.000Z","chosen_locale":"en-US","os_version":"7.1.2","browser":"Discord Android","domain":"Analytics","os":"Android","message_type":0,"channel_type":0,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","message_id":"334039020373803008","channel_id":"139535085769719809","event_type":"notification_clicked","region_code":"ON","client_version":"396","os_sdk_version":"25","event_id":"AQIDx2hBwfeP2koLE9qq2Hox3AAAAAA=","day":"530","time_zone":"America/Toronto","device":"Pixel XL, marlin"} -------------------------------------------------------------------------------- /event_examples/notification_sent_game_launched.json: -------------------------------------------------------------------------------- 1 | {"desktop":true,"timestamp":"2017-08-10T02:58:22.000Z","domain":"Analytics","variant":"b","user_id":"141734249702096896","event_type":"notification_sent_game_launched","game_name":"League of Legends","event_id":"AQID/fSjttKIj/mmIJVDqhL2MAAAAAA=","mobile":true,"day":"561"} -------------------------------------------------------------------------------- /event_examples/notification_viewed.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","notif_type":"Overlay Welcome Nudge","timestamp":"2018-07-29T18:01:39.558Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":20174,"client_send_timestamp":"1532887299506","overlay_game_name":"League of Legends (TM) Client","os":"Windows","overlay_game_id":"471","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-74p4","cfduid":"d9de41016f0ac520b9076c5cb2fec068b1532887161","event_source":"client","client_track_timestamp":"1532887299505","release_channel":"stable","event_type":"notification_viewed","region_code":"CA","client_version":"0.0.301","event_id":"AQMD2jJMFhTQicfSSOm6Zqj3AQAAAE0=","client_event_source":"OVERLAY","day":"914","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/nuf_step_complete.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"129.97.131.0","step":"-1","timestamp":"2016-01-27T16:28:17.000Z","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","event_type":"nuf_step_complete","region_code":"ON","event_id":"AQIDqEai21T8nhA7nfZOB6pKDwAAAAA=","day":"0","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/nuo_guild_info.json: -------------------------------------------------------------------------------- 1 | {"invited_guild_id":"81384788765712384","city":"Toronto","ip":"216.13.135.0","referring_domain":"www.google.ca","timestamp":"2016-07-06T16:59:48.000Z","search_engine":"google","chosen_locale":"en-US","browser":"Chrome","guild_count":5,"domain":"Analytics","os":"Windows","variant":"a","member_count":8148,"user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"nuo_guild_info","region_code":"ON","has_splash":false,"referrer":"https://www.google.ca/","evaluated_step":"DISABLED","event_id":"AQIDEVxkTqPlb5+8n+x4dGrdDAAAAAA=","day":"161","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/open_modal.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"129.97.131.0","source":"Guild List","timestamp":"2016-04-10T14:04:35.000Z","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","event_type":"open_modal","region_code":"ON","type":"Create Guild","event_id":"AQID69RcjpSUI7qoyz8ijmFNtAAAAAA=","day":"74","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/open_popout.json: -------------------------------------------------------------------------------- 1 | {"city":"Guelph","ip":"206.174.179.0","timestamp":"2016-11-12T21:50:29.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"open_popout","region_code":"ON","client_version":"0.0.296","type":"Channel Pins","event_id":"AQID562NV3Pv4MX/MUOi4NWZVAAAAAA=","day":"290","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/output_mute.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"129.97.131.0","timestamp":"2016-01-31T06:34:49.000Z","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","event_type":"output_mute","region_code":"ON","event_id":"AQIDbiZx/9K7k1vxPAbFuruLcAAAAAA=","day":"4","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/output_unmute.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"129.97.131.0","timestamp":"2016-01-31T06:34:49.000Z","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","event_type":"output_unmute","region_code":"ON","event_id":"AQIDZu+tlfxFsG8jt2JQnAirVgAAAAA=","day":"4","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/overlay_hook_result.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.253.0","success":true,"timestamp":"2018-05-01T18:46:40.086Z","gpu":"Unknown","game_id":"356869127241072640","chosen_locale":"en-US","os_version":"10.0.16299","graphics_height":1080,"browser":"Discord Client","graphics_width":1920,"domain":"Analytics","client_build_number":14308,"client_send_timestamp":"1525200402021","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-s5sz","cfduid":"db678fcfe73474280a11433a89edea7401525123717","event_source":"client","client_track_timestamp":"1525200402021","release_channel":"stable","graphics_info_after":6254,"event_type":"overlay_hook_result","cpu":"Unknown","framebuffer_source":"Shared Memory","renderer_started_after":1038,"game_name":"League of Legends","region_code":"ON","client_version":"0.0.301","first_framebuffer_after":6437,"graphics_api":"DirectX9","event_id":"AQMDoYris3+WQaueDp0skOKF/wAAAB4=","day":"825","time_zone":"America/Toronto","renderer_started":true} -------------------------------------------------------------------------------- /event_examples/overlay_hooked.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.231.0","timestamp":"2017-12-29T05:23:16.771Z","nonce":"14316.1514524993","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_send_timestamp":"1514524997692","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-clnt","client_track_timestamp":"1514524997692","release_channel":"stable","event_type":"overlay_hooked","region_code":"ON","client_version":"0.0.299","graphics_api":"DirectX9","event_id":"AQMDmOdqasBaUwz2xjJm2z3qHQAAAfk=","day":"702","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/overlay_hooking.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.231.0","timestamp":"2017-12-29T22:57:29.196Z","gpu":"NVIDIA GeForce GTX 960 (Driver:23.21.13.8813)","nonce":"1304.1514588249","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_send_timestamp":"1514588249584","os":"Microsoft Windows 10 Home (64-bit)","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-bp5f","client_track_timestamp":"1514588249539","release_channel":"stable","event_type":"overlay_hooking","cpu":"Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz","game_name":"League of Legends","region_code":"ON","client_version":"0.0.299","event_id":"AQMDVlh25mvYxlhAr62J4akn0wAAAFw=","day":"702","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/overlay_initialized.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","timestamp":"2018-07-21T17:14:44.240Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":19442,"client_send_timestamp":"1532193284934","os":"Windows","voice_widget_connected":false,"user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-jv32","cfduid":"d76d3b227b567ffaef662d61129d4a1b61532193188","event_source":"client","client_track_timestamp":"1532193284933","release_channel":"stable","event_type":"overlay_initialized","region_code":"CA","client_version":"0.0.301","event_id":"AQMD/iBfWfpQ0IowmhslA+P3hgAAAEs=","client_event_source":"OVERLAY","day":"906","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/overlay_locked.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","unlocked_duration":1785,"timestamp":"2018-07-24T03:57:23.356Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":19442,"client_send_timestamp":"1532404643900","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-s03r","cfduid":"d58d243cef66c590a15df3c431ee6dbe81532403622","event_source":"client","client_track_timestamp":"1532404643892","release_channel":"stable","event_type":"overlay_locked","region_code":"CA","client_version":"0.0.301","event_id":"AQMDr7l2RdfttY9LIzHK6nYNdgAAAM8=","client_event_source":"OVERLAY","day":"909","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/overlay_unlocked.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","timestamp":"2018-07-24T03:57:24.788Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":19442,"client_send_timestamp":"1532404645342","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-6p2c","cfduid":"d58d243cef66c590a15df3c431ee6dbe81532403622","event_source":"client","client_track_timestamp":"1532404645337","release_channel":"stable","event_type":"overlay_unlocked","region_code":"CA","client_version":"0.0.301","event_id":"AQMDr7l2RdfttY9LIzHK6nYNdgAAANE=","client_event_source":"OVERLAY","day":"909","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/permissions_acked.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"129.97.124.0","timestamp":"2017-10-28T23:36:26.626Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Mac OS X","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-gbfm","event_type":"permissions_acked","region_code":"ON","type":"audio","event_id":"AQEDHTA+gOhTb5ikIMZLEt2RVwCWXIc=","day":"640","time_zone":"America/Toronto","action":"accepted"} -------------------------------------------------------------------------------- /event_examples/permissions_requested.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"129.97.124.0","timestamp":"2017-10-28T23:36:24.927Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Mac OS X","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-w4tx","event_type":"permissions_requested","region_code":"ON","type":"audio","event_id":"AQED/NRRltWezKn6yer5U/QLxQIlQe4=","day":"640","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/pin_message.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"139535085769719809","city":"Guelph","ip":"206.174.179.0","timestamp":"2016-10-02T02:27:09.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","channel_id":"139535085769719809","release_channel":"stable","event_type":"pin_message","pinned":true,"region_code":"ON","client_version":"0.0.296","event_id":"AQID2yeUTY87B06yUFTL9QTpiAAAAAA=","day":"248","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/premium_page_opened.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"23.91.142.0","timestamp":"2017-01-24T00:00:36.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"premium_page_opened","region_code":"ON","client_version":"0.0.297","event_id":"AQIDctORyN0894m915dfmnmWxwAAAAA=","day":"362","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/premium_purchase_started.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","timestamp":"2018-06-02T07:33:43.126Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":16234,"client_send_timestamp":"1527924822803","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-ddgf","cfduid":"db46fdcabae34a43adf48336d8531e0641527924821","event_source":"client","client_track_timestamp":"1527924822767","release_channel":"stable","event_type":"premium_purchase_started","region_code":"CA","client_version":"0.0.301","event_id":"AQMDX9pUU3crGQ+9UI88WiYm4AAAASw=","day":"857","time_zone":"America/Los_Angeles","plan":"premium_month"} -------------------------------------------------------------------------------- /event_examples/quickswitcher_closed.json: -------------------------------------------------------------------------------- 1 | {"city":"Guelph","ip":"206.174.179.0","timestamp":"2017-05-30T20:58:46.000Z","chosen_locale":"en-US","os_version":"10.0.15063","browser":"Discord Client","domain":"Analytics","os":"Windows","query_mode":"USER","num_results_users":"0","num_results_guilds":"0","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","num_results_text_channels":"1","num_results_total":"1","country_code":"CA","top_result_type":"TEXT_CHANNEL","current_channel_type":1,"release_channel":"stable","event_type":"quickswitcher_closed","num_results_group_dms":"0","region_code":"ON","client_version":"0.0.297","query_length":"0","num_results_voice_channels":"0","top_result_score":0.0,"event_id":"AQIDQn3c+VZfEl25xTf00U0nngAAAAA=","current_channel_id":"142892278459924481","day":"489","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/quickswitcher_opened.json: -------------------------------------------------------------------------------- 1 | {"current_guild_id":"260272353118912522","city":"Toronto","ip":"45.72.231.0","source":"KEYBIND","timestamp":"2017-11-18T19:44:05.195Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_send_timestamp":"1511034245078","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-6gz6","current_channel_type":0,"client_track_timestamp":"1511034245051","release_channel":"stable","event_type":"quickswitcher_opened","region_code":"ON","client_version":"0.0.298","event_id":"AQMDmN+N1fR3Fw0J2cmitsSo3gAAABw=","current_channel_id":"260449715806535690","day":"661","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/quickswitcher_result_selected.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"69.165.141.0","timestamp":"2017-09-06T23:20:33.700Z","chosen_locale":"en-US","os_version":"10.0.15063","browser":"Discord Client","domain":"Analytics","selected_score":10000.0,"os":"Windows","query_mode":"USER","num_results_users":"1","num_results_guilds":"0","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","num_results_text_channels":"0","num_results_total":"1","country_code":"CA","top_result_type":"USER","freight_hostname":"api-prd-main-p9r4","current_channel_type":1,"release_channel":"stable","event_type":"quickswitcher_result_selected","selected_index":"1","num_results_group_dms":"0","selected_type":"USER","region_code":"ON","client_version":"0.0.298","query_length":"5","num_results_voice_channels":"0","top_result_score":10000.0,"event_id":"AQEDk337W5Hxge8LsEr9m0OkKgAc31k=","current_channel_id":"292510852194631680","day":"588","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/register.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"129.97.131.0","timestamp":"2016-01-27T02:41:18.000Z","browser":"Discord Client","domain":"Analytics","full":true,"instant_invite":false,"os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","event_type":"register","region_code":"ON","event_id":"AQIDGacBa9wMOyenn1qEDc4mFwAAAAA=","day":"0","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/remove_channel_recipient.json: -------------------------------------------------------------------------------- 1 | {"city":null,"ip":"206.71.29.0","timestamp":"2017-12-05T21:00:48.174Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Mac OS X","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-w9jm","channel_id":"375415100581871616","event_type":"remove_channel_recipient","region_code":"WI","owner":false,"event_id":"AQEDfG16d117oQVtcUJ5SPO8HAauXWM=","day":"678","time_zone":"America/Chicago"} -------------------------------------------------------------------------------- /event_examples/remove_reaction.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"81384788765712384","city":"Guelph","ip":"206.174.179.0","timestamp":"2016-11-04T11:52:12.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","emoji_name":"????","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","message_id":"241069563792326657","channel_id":"124294271900712960","release_channel":"stable","event_type":"remove_reaction","region_code":"ON","client_version":"0.0.296","event_id":"AQIDEt60r/IRdkIZZ5x+Vo8TegAAAAA=","day":"282","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/resolve_invite.json: -------------------------------------------------------------------------------- 1 | {"city":"Guelph","ip":"206.174.179.0","referring_domain":"www.google.ca","location":"Accept Invite Page","timestamp":"2016-11-26T23:23:42.000Z","search_engine":"google","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","code":"hkyT4nY","country_code":"CA","resolved":true,"event_type":"resolve_invite","region_code":"ON","authenticated":true,"referrer":"https://www.google.ca/","event_id":"AQIDIgmsAd32GEwL6h2iwQb2IwAAAAA=","day":"304","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/ring_call.json: -------------------------------------------------------------------------------- 1 | {"city":"Guelph","ip":"206.174.179.0","timestamp":"2016-11-09T03:31:23.000Z","chosen_locale":"en-US","browser":"Discord Android","domain":"Analytics","os":"Android","channel_type":1,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","channel_id":"189890576018046976","event_type":"ring_call","region_code":"ON","event_id":"AQID2ZHB91VpaFKkoK7pg5QDeQAAAAA=","day":"287","time_zone":"America/Toronto","device":"3.4.0-Sultan-CAF, 22, A0001, A0001, bacon"} -------------------------------------------------------------------------------- /event_examples/search_closed.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"129.97.124.0","channel_size_online":0,"channel_member_perms":"0","timestamp":"2017-06-02T12:31:05.000Z","chosen_locale":"en-US","os_version":"10.0.14393","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":1,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","channel_hidden":false,"channel_id":"186864488740290560","release_channel":"stable","event_type":"search_closed","region_code":"ON","client_version":"0.0.297","event_id":"AQIDZL6gM4PBEimpkGMomOPSGwAAAAA=","day":"492","time_zone":"America/Toronto","channel_size_total":1} -------------------------------------------------------------------------------- /event_examples/search_opened.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"260272353118912522","city":"Toronto","ip":"76.10.161.0","channel_size_online":254,"channel_member_perms":"1177930817","timestamp":"2017-10-17T01:53:39.783Z","guild_num_text_channels":8,"guild_is_vip":false,"chosen_locale":"en-US","os_version":"10.0.15063","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":0,"variant":"a","user_id":"141734249702096896","guild_size_total":1291,"detected_locale":"en-US","country_code":"CA","channel_hidden":true,"guild_num_roles":16,"freight_hostname":"api-prd-main-f1l6","guild_num_voice_channels":2,"channel_id":"260272353118912522","release_channel":"stable","event_type":"search_opened","guild_member_perms":"1177930817","region_code":"ON","client_version":"0.0.298","guild_member_num_roles":2,"guild_num_channels":12,"event_id":"AQED1t2u7DsrSgQKnxcdAdFkjQSpbh0=","day":"628","time_zone":"America/Toronto","channel_size_total":0} -------------------------------------------------------------------------------- /event_examples/search_result_expanded.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"260272353118912522","city":"Toronto","ip":"45.72.231.0","result_index":0,"channel_member_perms":"1177930817","timestamp":"2017-12-09T00:33:22.813Z","guild_num_text_channels":9,"guild_is_vip":false,"chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_send_timestamp":"1512779603339","os":"Windows","channel_type":0,"search_id":"a5fce414fed616a126ca45440ac89b45","user_id":"141734249702096896","guild_size_total":1549,"detected_locale":"en-US","country_code":"CA","channel_hidden":true,"guild_num_roles":22,"freight_hostname":"api-prd-main-pxrq","message_id":"388822880374358016","guild_num_voice_channels":3,"offset":0,"channel_id":"260272353118912522","client_track_timestamp":"1512779603306","page_results":"25","release_channel":"stable","event_type":"search_result_expanded","guild_member_perms":"1177930817","region_code":"ON","client_version":"0.0.298","guild_member_num_roles":3,"guild_num_channels":15,"event_id":"AQMD+gdYjvhM+B9l8rKqciUAqAAAAAo=","limit":25,"day":"681","time_zone":"America/Toronto","channel_size_total":0} -------------------------------------------------------------------------------- /event_examples/search_result_sort_changed.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"260272353118912522","city":"Toronto","ip":"45.72.231.0","channel_member_perms":"1177930817","timestamp":"2017-12-14T04:27:43.246Z","guild_num_text_channels":9,"new_sort_type":"relevance","guild_is_vip":false,"chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_send_timestamp":"1513225664891","os":"Windows","channel_type":0,"search_id":"7db223155178a72a69e9bd74ed4cc146","user_id":"141734249702096896","guild_size_total":1630,"detected_locale":"en-US","country_code":"CA","channel_hidden":true,"guild_num_roles":22,"freight_hostname":"api-prd-main-d8m4","guild_num_voice_channels":3,"channel_id":"260272353118912522","client_track_timestamp":"1513225664881","release_channel":"stable","event_type":"search_result_sort_changed","guild_member_perms":"1177930817","region_code":"ON","client_version":"0.0.299","guild_member_num_roles":3,"guild_num_channels":15,"event_id":"AQMD05nS25rlPN1Icm5yf8rwNgAAAO4=","day":"687","time_zone":"America/Toronto","channel_size_total":0} -------------------------------------------------------------------------------- /event_examples/search_result_viewed.json: -------------------------------------------------------------------------------- 1 | {"page_num_messages":25,"city":"Toronto","ip":"45.72.160.0","channel_size_online":0,"total_results":"229","channel_member_perms":"0","timestamp":"2017-08-15T19:38:52.000Z","chosen_locale":"en-US","os_version":"10.0.15063","browser":"Discord Client","domain":"Analytics","page_num_embeds":2,"page":1,"page_num_attach":0,"os":"Windows","channel_type":1,"variant":"a","search_id":"bcdbc159d6c48a31748664a7ddff7275","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","channel_hidden":false,"offset":0,"channel_id":"142892278459924481","page_results":25,"release_channel":"stable","page_num_links":2,"event_type":"search_result_viewed","region_code":"ON","client_version":"0.0.298","event_id":"AQID/efIt2lBoYFBxNsrVFwOdgAAAAA=","limit":25,"day":"566","time_zone":"America/Toronto","is_error":false,"channel_size_total":1} -------------------------------------------------------------------------------- /event_examples/search_started.json: -------------------------------------------------------------------------------- 1 | {"guild_id":"260272353118912522","city":"Toronto","num_modifiers":2,"ip":"76.10.161.0","channel_member_perms":"1177930817","timestamp":"2017-11-02T23:45:28.532Z","guild_num_text_channels":8,"guild_is_vip":false,"chosen_locale":"en-US","os_version":"10.0.15063","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":0,"variant":"a","user_id":"141734249702096896","guild_size_total":1385,"detected_locale":"en-US","country_code":"CA","channel_hidden":false,"guild_num_roles":22,"freight_hostname":"api-prd-main-z3sp","guild_num_voice_channels":3,"channel_id":"260449552711155712","prev_search_id":"e8c72f31f58eea19de7ee9e78366b061","release_channel":"stable","event_type":"search_started","guild_member_perms":"1177930817","modifiers":{"content":1,"author_id":1},"region_code":"ON","client_version":"0.0.298","guild_member_num_roles":3,"guild_num_channels":14,"event_id":"AQEDyul+tBNVML5S8gbiCsTTqwRPFbM=","day":"645","time_zone":"America/Toronto","channel_size_total":0} -------------------------------------------------------------------------------- /event_examples/send_message.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.224.0","channel":"139555170500476928","server":"139535085769719809","private":false,"timestamp":"2016-06-14T23:31:01.000Z","chosen_locale":"en-US","browser":"Discord Android","domain":"Analytics","os":"Android","variant":"a","is_friend":false,"user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"send_message","region_code":"ON","event_id":"AQIDaaqiivv+30d4ewDRIRVbOQAAAAA=","day":"139","time_zone":"America/Toronto","device":"3.4.0-Sultan-CAF, 22, A0001, A0001, bacon"} -------------------------------------------------------------------------------- /event_examples/session_end.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"209.171.88.0","timestamp":"2016-05-24T12:24:59.000Z","chosen_locale":"en-US","browser":"Discord Android","domain":"Analytics","os":"Android","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"session_end","region_code":"ON","session":"9c705a02acd943a7014f403334b8b083","event_id":"AQIDWGRXZZm8+qjFQs5qT3ft4AAAAAA=","day":"118","time_zone":"America/Toronto","device":"3.4.0-Sultan-CAF, 22, A0001, A0001, bacon"} -------------------------------------------------------------------------------- /event_examples/session_start.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.153.0","timestamp":"2016-08-08T03:41:37.000Z","chosen_locale":"en-US","browser":"Discord Android","domain":"Analytics","os":"Android","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"session_start","region_code":"ON","session":"012b9a64ba4400babe8d9a2c42595023","event_id":"AQIDCBsim4r05MaUCzP9/j0cIQAAAAA=","day":"194","time_zone":"America/Toronto","device":"3.4.0-Sultan-CAF, 22, A0001, A0001, bacon"} -------------------------------------------------------------------------------- /event_examples/settings_pane_viewed.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"45.62.218.0","channel_size_online":0,"channel_member_perms":"0","timestamp":"2017-07-15T18:36:29.000Z","chosen_locale":"en-US","os_version":"10.0.15063","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":1,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","settings_type":"user","destination_pane":"APPEARANCE","country_code":"CA","channel_hidden":false,"origin_pane":"GAMES","channel_id":"186864488740290560","release_channel":"stable","event_type":"settings_pane_viewed","region_code":"ON","client_version":"0.0.297","event_id":"AQIDs/vxBxzMDIqq2hPCopAhgQAAAAA=","day":"535","time_zone":"America/Toronto","channel_size_total":1} -------------------------------------------------------------------------------- /event_examples/show_tutorial.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"129.97.131.0","timestamp":"2016-01-29T23:31:49.000Z","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","tutorial":"instant-invite","country_code":"CA","event_type":"show_tutorial","region_code":"ON","event_id":"AQIDX+y8a4FNXyLfp4Ijq4KTswAAAAA=","day":"2","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/slash_command_used.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.225.0","timestamp":"2016-12-30T17:53:38.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","command":"shrug","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"slash_command_used","region_code":"ON","client_version":"0.0.296","event_id":"AQIDT/t4eZ/xU87gImZMqMgL7wAAAAA=","day":"338","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/soundshare_attached.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","share_game_id":"4294967293","timestamp":"2018-07-16T03:48:43.118Z","share_game_name":"Doki Doki Literature Club","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":18830,"client_send_timestamp":"1531712923244","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-lvqn","cfduid":"d8d2ef553c711fe8879d21145531d47bb1531712897","event_source":"client","client_track_timestamp":"1531712923220","release_channel":"stable","event_type":"soundshare_attached","region_code":"CA","client_version":"0.0.301","event_id":"AQMDJk27xpregCNGCfUltZD/pAAAAiI=","soundshare_session":"15172.1531712922","day":"901","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/soundshare_transmitting.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","share_game_id":"4294967293","timestamp":"2018-07-16T03:44:33.958Z","share_game_name":"Doki Doki Literature Club","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":18830,"client_send_timestamp":"1531712674088","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-bld8","cfduid":"da76b84a5ce69cd5a127492702a33f3611531712616","event_source":"client","client_track_timestamp":"1531712674047","release_channel":"stable","event_type":"soundshare_transmitting","region_code":"CA","client_version":"0.0.301","event_id":"AQMDJk27xpregCNGCfUltZD/pAAAAhM=","soundshare_session":"15172.1531712673","day":"901","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/start_call.json: -------------------------------------------------------------------------------- 1 | {"ip":"10.10.0.0","timestamp":"2016-09-24T05:10:30.000Z","chosen_locale":"en-US","domain":"Analytics","channel_type":1,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","message_id":"229107272867905538","channel_id":"209196379564670977","event_type":"start_call","event_id":"AQIDvXKZ2Tc3kh/pcs9Imoj9EgAAAAA=","day":"241"} -------------------------------------------------------------------------------- /event_examples/start_listening.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.224.0","channel":"139535552608337921","server":"139535085769719809","timestamp":"2016-07-01T03:27:21.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","mute":true,"user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"start_listening","region_code":"ON","client_version":"0.0.291","event_id":"AQIDSgaUvRWDJl2vUTMuLumz1AAAAAA=","day":"156","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/start_speaking.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.153.0","channel":"139535552608337921","server":"139535085769719809","timestamp":"2016-08-15T01:38:14.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"start_speaking","region_code":"ON","mode":"VOICE_ACTIVITY","client_version":"0.0.295","event_id":"AQIDdqet72W+vyaXZGnHLDUpHAAAAAA=","day":"200","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/stop_ringing_call.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.153.0","timestamp":"2016-08-11T02:49:04.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","self":true,"os":"Windows","channel_type":1,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","message_id":"213126600567291905","channel_id":"209196379564670977","release_channel":"stable","event_type":"stop_ringing_call","region_code":"ON","client_version":"0.0.295","event_id":"AQIDDf+ZxOhhIp+e2IYzTlB7ggAAAAA=","day":"197","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/stop_speaking.json: -------------------------------------------------------------------------------- 1 | {"duration":61151,"city":"Waterloo","ip":"45.62.218.0","timestamp":"2018-01-02T04:50:54.067Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_send_timestamp":"1514868654056","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-lt8w","client_track_timestamp":"1514868654056","release_channel":"stable","event_type":"stop_speaking","region_code":"ON","client_version":"0.0.299","event_id":"AQMDs7PenaY7l5T9jeeURFfQNAAAAFY=","day":"706","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/streamer_mode_toggle.json: -------------------------------------------------------------------------------- 1 | {"automatic":true,"city":"Toronto","ip":"45.72.153.0","timestamp":"2016-08-20T16:34:30.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","enabled":true,"os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"streamer_mode_toggle","region_code":"ON","client_version":"0.0.295","event_id":"AQIDbCIvsou1smUL2b66nTtDGwAAAAA=","day":"206","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/strict_ssl_request_attempt.json: -------------------------------------------------------------------------------- 1 | {"method":"node_request_strict","city":"Toronto","ip":"104.247.226.0","success":true,"timestamp":"2017-01-12T22:57:19.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"strict_ssl_request_attempt","region_code":"ON","client_version":"0.0.297","event_id":"AQIDBg0U3qh/ECtCmDctbMY5ogAAAAA=","day":"351","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/tweet_instant_invite.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.153.0","channel":"214171894071558146","server":"214171894071558146","timestamp":"2016-08-14T00:51:56.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","release_channel":"stable","event_type":"tweet_instant_invite","region_code":"ON","client_version":"0.0.295","event_id":"AQIDCWrNCJv7B3DgdooTKWssEQAAAAA=","day":"199","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/update_connected_account.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"45.62.218.0","timestamp":"2017-07-15T18:39:43.000Z","chosen_locale":"en-US","os_version":"10.0.15063","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","partner":false,"user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","platform_type":"twitch","release_channel":"stable","event_type":"update_connected_account","region_code":"ON","client_version":"0.0.297","connected":true,"friend_sync":false,"event_id":"AQIDum6B2v6JQc1I+3iH8A06hwAAAAA=","visibility":1,"day":"535","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/update_note.json: -------------------------------------------------------------------------------- 1 | {"city":"Ho Chi Minh City","ip":"113.173.163.0","timestamp":"2016-08-26T04:01:03.000Z","chosen_locale":"en-US","os_version":"10.0.10240","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"VN","release_channel":"stable","event_type":"update_note","region_code":"SG","client_version":"0.0.295","type":"add","event_id":"AQIDyfpbT9DzqfY9s/PgMWVNwgAAAAA=","day":"212","time_zone":"Asia/Ho_Chi_Minh"} -------------------------------------------------------------------------------- /event_examples/update_relationship.json: -------------------------------------------------------------------------------- 1 | {"is_initiator":true,"city":"Ho Chi Minh City","ip":"113.173.169.0","location":"Friends","timestamp":"2016-09-05T21:55:37.000Z","user_guilds":"7","chosen_locale":"en-US","os_version":"10.0.10240","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"VN","release_channel":"stable","event_type":"update_relationship","region_code":"SG","client_version":"0.0.295","mutual_guilds":"2","type":1,"event_id":"AQIDv8mgR68vFm8J5+7ijAS5qgAAAAA=","day":"222","time_zone":"Asia/Ho_Chi_Minh"} -------------------------------------------------------------------------------- /event_examples/update_streamer_mode_settings.json: -------------------------------------------------------------------------------- 1 | {"automatic":true,"city":"Toronto","ip":"76.10.154.0","disable_sounds":false,"timestamp":"2017-03-11T02:37:21.000Z","chosen_locale":"en-US","os_version":"10.0.14393","browser":"Discord Client","domain":"Analytics","enabled":false,"os":"Windows","disable_notifications":true,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","hide_personal_info":true,"country_code":"CA","release_channel":"stable","event_type":"update_streamer_mode_settings","region_code":"ON","client_version":"0.0.297","event_id":"AQIDmy4uHvdBlBW9RMKSROjiOgAAAAA=","day":"408","time_zone":"America/Toronto","hide_instant_invites":true} -------------------------------------------------------------------------------- /event_examples/update_user_settings.json: -------------------------------------------------------------------------------- 1 | {"guild_positions":["139535085769719809","81384788765712384","125440014904590336","211956402531336193","156231658352279552","214223672884330496","196309256058699776","166379024040329216"],"city":"Ho Chi Minh City","ip":"113.173.187.0","show_current_game":true,"timestamp":"2016-08-29T04:43:27.000Z","restricted_guilds":[],"chosen_locale":"en-US","os_version":"10.0.10240","browser":"Discord Client","domain":"Analytics","message_display_compact":false,"friend_source_flags":14,"os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","locale":"en-US","country_code":"VN","developer_mode":false,"inline_attachment_media":true,"release_channel":"stable","event_type":"update_user_settings","enable_tts_command":true,"region_code":"SG","convert_emoticons":true,"client_version":"0.0.295","render_embeds":true,"theme":"dark","event_id":"AQIDRWhu+eP4fABGT7CZd/qKdwAAAAA=","inline_embed_media":true,"day":"215","time_zone":"Asia/Ho_Chi_Minh"} -------------------------------------------------------------------------------- /event_examples/user_account_updated.json: -------------------------------------------------------------------------------- 1 | {"city":"San Francisco","ip":"76.21.57.0","timestamp":"2018-06-04T05:07:02.654Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","is_user_set_discriminator":false,"domain":"Analytics","client_build_number":16234,"os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","country_code":"US","freight_hostname":"api-prd-main-fmgg","cfduid":"d1a96f18bcc93be70944dc11e9e57e09d1528088813","event_source":"api","release_channel":"stable","event_type":"user_account_updated","region_code":"CA","client_version":"0.0.301","event_id":"AQEDOIVTi9v94RszFiOIj/IcOQwDixw=","day":"859","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/user_avatar_updated.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"76.10.161.0","timestamp":"2017-10-23T02:33:55.769Z","chosen_locale":"en-US","os_version":"10.0.15063","animated":false,"browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-4m6s","release_channel":"stable","event_type":"user_avatar_updated","region_code":"ON","client_version":"0.0.298","event_id":"AQEDNWqR/B6zT0hb1V6LWZwOLgF1yls=","day":"634","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/user_settings_opened.json: -------------------------------------------------------------------------------- 1 | {"city":"Toronto","ip":"45.72.225.0","channel_size_online":0,"channel_member_perms":"0","timestamp":"2016-12-28T04:54:43.000Z","chosen_locale":"en-US","os_version":"10.0.10586","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":1,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","channel_hidden":false,"channel_id":"142892278459924481","release_channel":"stable","event_type":"user_settings_opened","region_code":"ON","client_version":"0.0.296","event_id":"AQID62JIt1yWLyyNfostwPXZlwAAAAA=","day":"336","time_zone":"America/Toronto","channel_size_total":1} -------------------------------------------------------------------------------- /event_examples/verify_account.json: -------------------------------------------------------------------------------- 1 | {"city":"Oakville","ip":"142.46.208.0","timestamp":"2017-01-09T20:33:02.000Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"verify_account","region_code":"ON","event_id":"AQIDf6mEfXQURgeFL73j7HeL7AAAAAA=","day":"348","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/video_input_toggled.json: -------------------------------------------------------------------------------- 1 | {"video_stream_count":"0","city":"Toronto","ip":"45.72.160.0","voice_state_count":"2","timestamp":"2017-08-15T01:36:00.000Z","chosen_locale":"en-US","os_version":"10.0.15063","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":3,"variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","channel_id":"346829302265806848","release_channel":"stable","event_type":"video_input_toggled","video_input_type":"none","region_code":"ON","client_version":"0.0.298","event_id":"AQIDnL/hSM5y7knkzEvzHsFSugAAAAA=","video_enabled":false,"day":"565","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/video_layout_toggled.json: -------------------------------------------------------------------------------- 1 | {"video_stream_count":"1","city":"Toronto","ip":"45.72.231.0","voice_state_count":"4","timestamp":"2017-11-08T03:53:01.818Z","chosen_locale":"en-US","os_version":"10.0.15063","browser":"Discord Client","domain":"Analytics","os":"Windows","channel_type":3,"variant":"a","video_layout":"normal","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","freight_hostname":"api-prd-main-gjnd","channel_id":"377659620597956608","release_channel":"stable","event_type":"video_layout_toggled","game_name":"chinese cartoons","region_code":"ON","client_version":"0.0.298","event_id":"AQEDtCr6TtqSAtDgODCRI25FYwASpbA=","video_enabled":false,"day":"651","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/view_landing.json: -------------------------------------------------------------------------------- 1 | {"city":"Oakville","ip":"142.46.208.0","timestamp":"2017-03-03T14:41:04.000Z","chosen_locale":"en-US","browser":"Chrome","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","detected_locale":"en-US","country_code":"CA","event_type":"view_landing","region_code":"ON","marketing_variant":"a","event_id":"AQIDk6No3GDJpGJqdv0dF/itmgAAAAA=","day":"401","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/voice_connect.json: -------------------------------------------------------------------------------- 1 | {"city":"Waterloo","ip":"129.97.131.0","timestamp":"2016-01-30T19:06:42.000Z","browser":"Discord Client","domain":"Analytics","os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","event_type":"voice_connect","region_code":"ON","event_id":"AQIDDaAyRFdBHIaNvdKQAlZ39wAAAAA=","day":"3","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_examples/voice_connection_success.json: -------------------------------------------------------------------------------- 1 | {"connect_count":1,"city":"San Francisco","ip":"76.21.57.0","hostname":"us-east181.discord.gg","timestamp":"2018-07-11T03:59:55.141Z","chosen_locale":"en-US","os_version":"10.0.16299","browser":"Discord Client","domain":"Analytics","client_build_number":18362,"client_send_timestamp":"1531281595016","os":"Windows","user_id":"141734249702096896","detected_locale":"en-US","rtc_connection_id":"f1ca7a14-bba0-4248-865d-84566620d820","country_code":"US","freight_hostname":"api-prd-main-brhs","cfduid":"d73575e295001b74487abdb70cd2570fd1531276066","connect_time":"703","event_source":"client","client_track_timestamp":"1531281594988","release_channel":"stable","event_type":"voice_connection_success","region_code":"CA","client_version":"0.0.301","event_id":"AQMDXlX4D8B53RF1kl2gJIAHoAAAAMU=","day":"896","time_zone":"America/Los_Angeles"} -------------------------------------------------------------------------------- /event_examples/voice_disconnect.json: -------------------------------------------------------------------------------- 1 | {"duration":"3093756","connect_count":1,"city":"San Francisco","ip":"76.21.57.0","hostname":"us-east414.discord.gg","timestamp":"2018-06-20T05:28:44.158Z","chosen_locale":"en-US","reconnect":false,"os_version":"10.0.16299","packets_received":70822,"browser":"Discord Client","domain":"Analytics","client_build_number":17111,"client_send_timestamp":"1529472524231","os":"Windows","reason":"Force Close","user_id":"141734249702096896","detected_locale":"en-US","ping_bad_count":8,"rtc_connection_id":"7473ec62-b3ce-4812-989f-720586ae557b","country_code":"US","media_session_id":"e11dd5ed0c93e8b8f0343ad89457ea0d","freight_hostname":"api-prd-main-lqwt","cfduid":"dce8980fc311b7ef26ce89e0c5e804a0e1529471166","event_source":"client","client_track_timestamp":"1529472524176","release_channel":"stable","event_type":"voice_disconnect","region_code":"CA","client_version":"0.0.301","event_id":"AQMDFHWEw6jZD2KOTxBZSVd0sAAAAOw=","day":"875","time_zone":"America/Los_Angeles","packets_lost":4031,"protocol":"udp","packets_sent":50578,"ping_average":269} -------------------------------------------------------------------------------- /event_examples/voice_quality.json: -------------------------------------------------------------------------------- 1 | {"speaker":"93777943653785600","guild_id":"139535085769719809","quality":0.8526377081871033,"duration":"89981","city":"Toronto","ip":"69.196.128.0","session_id":"2507db50938aa533d9952e3653755113","timestamp":"2016-05-13T01:33:51.000Z","tier":1,"previous_tier":0,"browser":"Discord Client","domain":"Analytics","maximum_ping":"18","os":"Windows","variant":"a","user_id":"141734249702096896","country_code":"CA","channel_id":"139535552608337921","event_type":"voice_quality","minimum_ping":"17","region_code":"ON","average_ping":"18","event_id":"AQIDne9sbQPGZJ4fMh1fY9JfXgAAAAA=","day":"106","time_zone":"America/Toronto"} -------------------------------------------------------------------------------- /event_list.txt: -------------------------------------------------------------------------------- 1 | accepted_instant_invite 2 | ack_messages 3 | activity_updated 4 | add_channel_recipient 5 | add_reaction 6 | af_exited 7 | af_loaded 8 | af_viewed 9 | app_opened 10 | application_assets_enabled 11 | application_created 12 | application_updated 13 | authorize_login_location 14 | authorized_app_connected 15 | change_log_closed 16 | change_log_opened 17 | channel_notice_closed 18 | channel_notice_viewed 19 | channel_opened 20 | claim_account 21 | click_landing_cta 22 | close_tutorial 23 | connected_account_initiated 24 | connected_account_viewed 25 | copy_instant_invite 26 | create_channel 27 | create_emoji 28 | create_guild 29 | create_instant_invite 30 | create_oauth2_application 31 | data_request_initiated 32 | delete_emoji 33 | delete_guild 34 | detect_platform_account 35 | download_app 36 | enable_notifications 37 | experiment_guild_triggered 38 | experiment_user_triggered 39 | footer_navigation 40 | friend_request_failed 41 | friends_list_viewed 42 | game_news_changed 43 | game_opened 44 | guild_settings_opened 45 | guild_viewed 46 | hook_result 47 | ignore_platform_account 48 | input_mute 49 | input_unmute 50 | invite_app_invoked 51 | invite_opened 52 | invite_sent 53 | invite_suggestion_opened 54 | invite_viewed 55 | join_call 56 | join_experiment 57 | join_voice_channel 58 | joined_integration 59 | jump 60 | launch_game 61 | leave_guild 62 | leave_voice_channel 63 | local_settings_updated 64 | login_successful 65 | login_viewed 66 | main_navigation_menu 67 | message_attachment_updated 68 | message_edited 69 | mktg_hypesquad_form_opened 70 | mktg_hypesquad_loaded 71 | mktg_page_viewed 72 | nav_drawer_opened 73 | new_login_location 74 | notification_clicked 75 | notification_sent_game_launched 76 | notification_viewed 77 | nuf_step_complete 78 | nuo_guild_info 79 | open_modal 80 | open_popout 81 | output_mute 82 | output_unmute 83 | overlay_hook_result 84 | overlay_hooked 85 | overlay_hooking 86 | overlay_initialized 87 | overlay_locked 88 | overlay_unlocked 89 | permissions_acked 90 | permissions_requested 91 | pin_message 92 | premium_page_opened 93 | premium_purchase_started 94 | quickswitcher_closed 95 | quickswitcher_opened 96 | quickswitcher_result_selected 97 | register 98 | remove_channel_recipient 99 | remove_reaction 100 | resolve_invite 101 | ring_call 102 | search_closed 103 | search_opened 104 | search_result_expanded 105 | search_result_sort_changed 106 | search_result_viewed 107 | search_started 108 | send_message 109 | session_end 110 | session_start 111 | settings_pane_viewed 112 | show_tutorial 113 | slash_command_used 114 | soundshare_attached 115 | soundshare_transmitting 116 | start_call 117 | start_listening 118 | start_speaking 119 | stop_ringing_call 120 | stop_speaking 121 | streamer_mode_toggle 122 | strict_ssl_request_attempt 123 | tweet_instant_invite 124 | update_connected_account 125 | update_note 126 | update_relationship 127 | update_streamer_mode_settings 128 | update_user_settings 129 | user_account_updated 130 | user_avatar_updated 131 | user_settings_opened 132 | verify_account 133 | video_input_toggled 134 | video_layout_toggled 135 | view_landing 136 | voice_connect 137 | voice_connection_success 138 | voice_disconnect 139 | voice_quality -------------------------------------------------------------------------------- /examples/markov.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brainicism/DiscordDataParser/6cabefeb0c9281d8d56bf20971f7f80c0af2e2c7/examples/markov.png -------------------------------------------------------------------------------- /examples/message_analysis_charts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brainicism/DiscordDataParser/6cabefeb0c9281d8d56bf20971f7f80c0af2e2c7/examples/message_analysis_charts.png -------------------------------------------------------------------------------- /examples/messages_by_date.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brainicism/DiscordDataParser/6cabefeb0c9281d8d56bf20971f7f80c0af2e2c7/examples/messages_by_date.png -------------------------------------------------------------------------------- /examples/os_device_words_location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brainicism/DiscordDataParser/6cabefeb0c9281d8d56bf20971f7f80c0af2e2c7/examples/os_device_words_location.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Brainicism/DiscordDataParser/6cabefeb0c9281d8d56bf20971f7f80c0af2e2c7/public/favicon.ico -------------------------------------------------------------------------------- /public/index.css: -------------------------------------------------------------------------------- 1 | .chartRow { 2 | display: inline-flex; 3 | margin-bottom: 2rem; 4 | width: 100%; 5 | } 6 | 7 | .graph-1 { 8 | margin: 0 1rem 0 1rem; 9 | width: 100%; 10 | } 11 | 12 | .graph-2 { 13 | margin: 0 1rem 0 1rem; 14 | width: 50%; 15 | } 16 | 17 | body { 18 | background-color: #2C2F33; 19 | } 20 | 21 | .description-text { 22 | text-align: center; 23 | color: #dcddde; 24 | font-family: 'Roboto'; 25 | } 26 | 27 | .graph-source { 28 | float: right; 29 | font-family: 'Roboto'; 30 | color: #ffffff; 31 | position: relative; 32 | top: 1.5rem; 33 | right: 0.5rem; 34 | font-size: 0.75rem; 35 | text-decoration: underline; 36 | } 37 | 38 | .title { 39 | margin-top: 2rem; 40 | font-family: 'Roboto'; 41 | color: #dcddde; 42 | text-decoration: underline; 43 | text-align: center; 44 | } 45 | 46 | .section-heading { 47 | margin-top: 2rem; 48 | margin-bottom: 0.5rem; 49 | font-family: 'Roboto'; 50 | color: #dcddde; 51 | text-align: center; 52 | } 53 | 54 | .section-subheading { 55 | margin-bottom: 0.5rem; 56 | font-family: 'Roboto'; 57 | color: #dcddde; 58 | text-align: center; 59 | } 60 | 61 | .section { 62 | margin-bottom: 5rem; 63 | } 64 | 65 | .misc-data { 66 | margin-bottom: 1rem; 67 | } 68 | 69 | .misc-data > p { 70 | text-align: center; 71 | color: #dcddde; 72 | font-family: 'Roboto'; 73 | margin-top: 0; 74 | margin-bottom: 0; 75 | } 76 | 77 | p { 78 | word-break: break-all; 79 | white-space: normal; 80 | } 81 | 82 | .speech-bubble { 83 | position: relative; 84 | background: #23272A; 85 | border-radius: .4em; 86 | margin-bottom: 2rem; 87 | } 88 | 89 | .speech-bubble:after { 90 | content: ''; 91 | position: absolute; 92 | bottom: 0; 93 | left: 50%; 94 | width: 0; 95 | height: 0; 96 | border: 1rem solid transparent; 97 | border-top-color: #23272A; 98 | border-bottom: 0; 99 | border-left: 0; 100 | margin-left: 0; 101 | margin-bottom: -1rem; 102 | } 103 | -------------------------------------------------------------------------------- /public/index.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Analysis 11 | 12 | 13 | 14 |

<%= "#{@username}##{@user_tag} " %>

15 |

The complete set of processed data can be found in the 'output/' directory

16 |

<%= "All events parsed in UTC#{@utc_offset}" %>

17 |
18 |

Message Analysis <%= "with '#{@specified_thread_name}'" if @specified_thread_name %>

19 |

Misc Data

20 |
21 |

Analysis Length: <%= @misc_data[:messages][:analysis_duration]%> seconds

22 |

Total Message Count: <%= @misc_data[:messages][:total_message_count]%>

23 |

Average Words Per Message: <%= @misc_data[:messages][:average_words_per_message]%>

24 |

Average Messages Per Day: <%= @misc_data[:messages][:average_messages_per_day]%>

25 |
26 |
27 |
28 | Source 29 | 30 |
31 |
32 | 33 |
34 |
35 | Source 36 | 37 |
38 |
39 | Source 40 | 41 |
42 |
43 | 44 |
45 |
46 | Source 47 | 48 |
49 |
50 | Source 51 | 52 |
53 |
54 | 55 |
56 |
57 | Source 58 | 59 |
60 |
61 |
62 |
63 |

Event Analysis

64 | <% if @activity_available %> 65 |

Misc Data

66 |
67 |

Analysis Length: <%= @misc_data[:activity][:analysis_duration]%> seconds

68 |

Total Sessions: <%= @misc_data[:activity][:total_sessions]%>

69 |

Average Session Length: <%= @misc_data[:activity][:average_session_length]%>

70 |

Total App Opens: <%= @misc_data[:activity][:total_app_opens]%>

71 |

Total Reactions Added: <%= @misc_data[:activity][:total_reactions_added]%>

72 |

Total Reactions Removed: <%= @misc_data[:activity][:total_reactions_removed]%>

73 |

Total Voice Channel Joins: <%= @misc_data[:activity][:total_voice_channel_joins]%>

74 |
75 |
76 |
77 | Source 78 | 79 |
80 |
81 | Source 82 | 83 |
84 |
85 | 86 |
87 |
88 | Source 89 | 90 |
91 |
92 | Source 93 | 94 |
95 |
96 |
97 |
98 | Source 99 | 100 |
101 |
102 | <% else %> 103 |

No activity data found. Refer here for more details

104 | <% end %> 105 |
106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /public/index.js.erb: -------------------------------------------------------------------------------- 1 | const COLOR = { 2 | WHITE: 'white', 3 | LABEL_GREY: 'rgba(180, 180, 180, 1)', 4 | GRID_GREY: 'rgba(153, 170, 181, 0.25)', 5 | BLURPLE: 'rgba(114, 137, 218, 0.5)', 6 | BLURPLE_SCHEME: ['rgba(16, 26, 61, 0.5)', 7 | 'rgba(26, 43, 102, 0.5)', 8 | 'rgba(37, 60, 142, 0.5)', 9 | 'rgba(48, 77, 182, 0.5)', 10 | 'rgba(74, 103, 207, 0.5)', 11 | 'rgba(114, 137, 218, 0.5)', 12 | 'rgba(154, 171, 229, 0.5)', 13 | 'rgba(195, 205, 239, 0.5)', 14 | 'rgba(235, 239, 250, 0.5)', 15 | 'rgba(255, 255, 255, 0.5)'] 16 | } 17 | window.onload = function () { 18 | const output = <%= @json_output %>; 19 | createChart(output, 'by_date', "messagesByDay", { 20 | title: "Messages By Date", 21 | xAxisTitle: 'Date', 22 | yAxisTitle: 'Number of Messages', 23 | type: 'line' 24 | }); 25 | createChart(output, 'by_day_of_week', "messagesByDayOfWeek", { 26 | title: "Messages by Day of Week", 27 | xAxisTitle: 'Day of Week', 28 | yAxisTitle: 'Number of Messages', 29 | type: 'bar' 30 | }); 31 | createChart(output, 'by_time_of_day', "messagesByTimeOfDay", { 32 | title: "Messages by Time of Day", 33 | xAxisTitle: 'Time of Day', 34 | yAxisTitle: 'Number of Messages', 35 | type: 'bar' 36 | }); 37 | createChart(output, 'commonly_used_messages', "commonlyUsedMessages", { 38 | title: "Commonly Used Messages", 39 | xAxisTitle: 'Message', 40 | yAxisTitle: 'Number of Occurrences', 41 | type: 'bar', 42 | dataLimit: 25 43 | }); 44 | createChart(output, 'commonly_used_words', "commonlyUsedWords", { 45 | title: "Commonly Used Words", 46 | xAxisTitle: 'Word', 47 | yAxisTitle: 'Number of Occurrences', 48 | type: 'bar', 49 | dataLimit: 25 50 | }); 51 | createChart(output, 'per_thread', "perThread", { 52 | title: "Most Active Threads", 53 | xAxisTitle: 'Thread Name', 54 | yAxisTitle: 'Number of Messages', 55 | type: 'bar', 56 | dataLimit: 25 57 | }); 58 | <% if @activity_available %> 59 | createChart(output, 'time_by_os', "timeByOS", { 60 | title: "Time Spent By OS", 61 | xAxisTitle: 'OS', 62 | yAxisTitle: 'Time Spent (minutes)', 63 | type: 'doughnut' 64 | }); 65 | createChart(output, 'time_by_location', "timeByLocation", { 66 | title: "Time Spent By Location", 67 | xAxisTitle: 'Location', 68 | yAxisTitle: 'Time Spent (minutes)', 69 | type: 'doughnut', 70 | dataLimit: 10 71 | }); 72 | createChart(output, 'time_by_device', "timeByDevice", { 73 | title: "Time Spent By Device", 74 | xAxisTitle: 'Device', 75 | yAxisTitle: 'Time Spent (minutes)', 76 | type: 'doughnut', 77 | dataLimit: 10 78 | }); 79 | createChart(output, 'reactions_by_use', "reactionsByUse", { 80 | title: "Reactions By Use", 81 | xAxisTitle: 'Reaction', 82 | yAxisTitle: 'Number of Occurrences', 83 | type: 'bar', 84 | dataLimit: 25 85 | }); 86 | createChart(output, 'games_play_count', "gamesPlayCount", { 87 | title: "Game Play Count", 88 | xAxisTitle: 'Game', 89 | yAxisTitle: 'Play Count', 90 | type: 'bar', 91 | dataLimit: 25 92 | }); 93 | <% end %> 94 | } 95 | 96 | const createChart = (outputData, dataKey, chartName, chartOptions) => { 97 | let dataLabels = outputData[dataKey].map(data => data[0]); 98 | let dataValues = outputData[dataKey].map(data => data[1]); 99 | const ctx = document.getElementById(chartName).getContext('2d'); 100 | 101 | dataValues = dataValues.slice(0, chartOptions.dataLimit); 102 | 103 | // Shorten visible values/labels to improve chart readability 104 | 105 | dataLabels = dataLabels.slice(0, chartOptions.dataLimit); 106 | 107 | const xAxisAutoskip = (chartOptions) => { 108 | 109 | // When autoskipping is set to true in xAxes.ticks, some labels on the 110 | // x-axis are hidden for readability's sake. However, we only want this 111 | // to happen when we have a large amount of labels present (like in the 112 | // line chart). 113 | 114 | return chartOptions.type === 'line'; 115 | } 116 | 117 | if (chartOptions.type === 'doughnut') { 118 | 119 | // No axes for doughnut charts 120 | 121 | const myChart = new Chart(ctx, { 122 | type: chartOptions.type, 123 | data: { 124 | labels: dataLabels, 125 | datasets: [{ 126 | data: dataValues, 127 | backgroundColor: COLOR.BLURPLE_SCHEME, 128 | foregroundColor: COLOR.BLURPLE, 129 | borderColor: COLOR.BLURPLE, 130 | borderWidth: 1 131 | }] 132 | }, 133 | options: { 134 | title: { 135 | display: true, 136 | text: chartOptions.title, 137 | fontColor: COLOR.WHITE 138 | }, 139 | legend: { 140 | display: true, 141 | position: 'right', 142 | labels: { 143 | fontColor: COLOR.WHITE 144 | } 145 | } 146 | } 147 | }); 148 | } 149 | else { 150 | const myChart = new Chart(ctx, { 151 | type: chartOptions.type, 152 | data: { 153 | labels: dataLabels, 154 | datasets: [{ 155 | data: dataValues, 156 | backgroundColor: COLOR.BLURPLE, 157 | foregroundColor: COLOR.BLURPLE, 158 | borderColor: COLOR.BLURPLE, 159 | borderWidth: 1 160 | }] 161 | }, 162 | options: { 163 | title: { 164 | display: true, 165 | text: chartOptions.title, 166 | fontColor: COLOR.WHITE 167 | }, 168 | legend: { 169 | display: false 170 | }, 171 | scales: { 172 | yAxes: [{ 173 | scaleLabel: { 174 | display: true, 175 | fontColor: COLOR.WHITE, 176 | labelString: chartOptions.yAxisTitle 177 | }, 178 | ticks: { 179 | fontColor: COLOR.LABEL_GREY 180 | }, 181 | gridLines: { 182 | color: COLOR.GRID_GREY 183 | } 184 | }], 185 | xAxes: [{ 186 | ticks: { 187 | fontColor: COLOR.LABEL_GREY, 188 | autoSkip: xAxisAutoskip(chartOptions) 189 | }, 190 | gridLines: { 191 | color: COLOR.GRID_GREY 192 | }, 193 | scaleLabel: { 194 | fontColor: COLOR.WHITE, 195 | display: true, 196 | labelString: chartOptions.xAxisTitle 197 | } 198 | }] 199 | } 200 | } 201 | }); 202 | } 203 | } 204 | -------------------------------------------------------------------------------- /src/analyzers/account_analyzer.rb: -------------------------------------------------------------------------------- 1 | class AccountAnalyzer 2 | def initialize(path, params) 3 | @path = path 4 | @params = params 5 | @avatar_path = Dir.glob("#{@path}/avatar.*")[0] 6 | # Use globbing pattern to allow detection of multiple 7 | # avatar file formats 8 | end 9 | 10 | def call 11 | account_details = JSON.parse File.read "#{@path}/user.json" 12 | { 13 | output_files: [], 14 | misc_data: { 15 | avatar_path: "#{@avatar_path}" 16 | }, 17 | output_data: { 18 | username: account_details['username'], 19 | user_tag: account_details['discriminator'], 20 | email: account_details['email'] 21 | } 22 | } 23 | end 24 | end 25 | 26 | -------------------------------------------------------------------------------- /src/analyzers/activity_analyzer.rb: -------------------------------------------------------------------------------- 1 | require_relative '../utils' 2 | require_relative '../processors/voice_processor' 3 | require_relative '../processors/game_processor' 4 | require_relative '../processors/reaction_processor' 5 | require_relative '../processors/session_processor' 6 | require_relative '../processors/verify_events_processor' 7 | class ActivityAnalyzer 8 | attr_reader :path, :session_processor, :reaction_processor, :game_processor, :voice_processor, :verify_events_processor, :output_available 9 | attr_accessor :games 10 | 11 | def initialize(path, params) 12 | @params = params 13 | @path = path 14 | @session_processor = SessionProcessor.new 15 | @reaction_processor = ReactionProcessor.new 16 | @game_processor = GameProcessor.new 17 | @voice_processor = VoiceProcessor.new 18 | @verify_events_processor = VerifyEventsProcessor.new(@params[:verify_events], @params[:update_events]) 19 | @output_available = false 20 | end 21 | 22 | def call 23 | unless File.directory? path 24 | puts "#{ path } doesn't exist\n" 25 | return {} 26 | end 27 | @start_time = Time.now 28 | puts 'Begin parsing activity...' 29 | index = 0 30 | Dir.foreach(path) do |activity_log| 31 | next if ['.', '..'].include? activity_log 32 | index += 1 33 | break if @params[:quick_run] == true && index == 2 34 | puts "Progress: #{index}/#{Utils.get_num_of_files(path)} (#{activity_log})" 35 | Utils.parse_funky_new_line_json_array("#{path}/#{activity_log}") do |parsed_activity_line| 36 | event_type = parsed_activity_line['event_type'] 37 | processors.each { |processor| processor.process(parsed_activity_line, event_type) } 38 | end 39 | end 40 | @end_time = Time.now 41 | puts 'Finished parsing activity...' 42 | results(output) 43 | end 44 | 45 | def results(output) 46 | output_files = [] 47 | @output_available = true 48 | [:games_play_count, :time_by_os, :time_by_location, :time_by_device, :reactions_by_use].each do |type| 49 | Utils.write_output_csv(output, 'analyzed/activity', type) { |output_file| output_files.push(output_file) } 50 | end 51 | { 52 | output_files: output_files, 53 | misc_data: { 54 | activity: { 55 | analysis_duration: (@end_time - @start_time).round(1), 56 | total_sessions: output[:total_sessions], 57 | average_session_length: output[:average_session_length], 58 | total_app_opens: output[:total_app_open], 59 | total_reactions_added: output[:total_reactions_added], 60 | total_reactions_removed: output[:total_reactions_removed], 61 | total_voice_channel_joins: output[:total_voice_channel_connections] 62 | } 63 | }, 64 | output_data: output 65 | } 66 | end 67 | 68 | def timezone_offsets_by_day 69 | @output_available ? output[:timezone_offsets_by_day] : {} 70 | end 71 | 72 | private 73 | 74 | def processors 75 | if verify_events? 76 | [verify_events_processor] 77 | else 78 | [session_processor, reaction_processor, game_processor, voice_processor] 79 | end 80 | end 81 | 82 | def output 83 | [verify_events_processor.output] if verify_events? 84 | [session_processor.output, reaction_processor.output, game_processor.output, voice_processor.output, verify_events_processor.output].reduce({}, :merge) 85 | end 86 | 87 | def verify_events? 88 | @params[:verify_events] || @params[:update_events] 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /src/analyzers/messages_analyzer.rb: -------------------------------------------------------------------------------- 1 | require_relative '../utils' 2 | require_relative '../processors/message_content_processor' 3 | require_relative '../processors/message_by_date_processor' 4 | require_relative '../processors/message_prettifier_processor' 5 | class MessagesAnalyzer 6 | attr_reader :path, :message_by_content_processor, :message_by_date_processor, :message_prettifier_processor 7 | 8 | def initialize(path, params, activity_analyzer) 9 | @path = path 10 | @params = params 11 | @message_by_content_processor = MessageByContentProcessor.new(params) 12 | @message_by_date_processor = MessageByDateProcessor.new 13 | @message_prettifier_processor = MessagePrettifierProcessor.new 14 | @activity_analyzer = activity_analyzer 15 | end 16 | 17 | def call 18 | raise "#{path} doesn't exist\n" unless File.directory? path 19 | message_index = Utils.parse_json_from_file("#{path}/index.json") 20 | @start_time = Time.now 21 | puts 'Begin parsing messages...' 22 | if @params[:thread_id] 23 | message_index = message_index.select { |thread_id| thread_id == @params[:thread_id] } 24 | @specified_thread_name = message_index[@params[:thread_id]] || 'unknown' 25 | raise "Couldn't find thread id: #{@params[:thread_id]}" if message_index.empty? 26 | end 27 | total_threads = message_index.length 28 | @timezone_offsets_by_day = @activity_analyzer.timezone_offsets_by_day || {} 29 | message_index.each_with_index do |(thread_id, thread_name), index| 30 | break if @params[:quick_run] == true && index > 50 31 | thread_name = thread_name.nil? ? 'unknown_user' : thread_name 32 | puts "Progress: #{index + 1}/#{total_threads} (#{thread_name})" 33 | parse_message_file("#{path}/#{thread_id}/messages.csv", thread_name, thread_id) 34 | end 35 | @end_time = Time.now 36 | puts 'Finished parsing messages...' 37 | results(output) 38 | end 39 | 40 | def results(output) 41 | output_files = [] 42 | output[:specified_thread_name] = @specified_thread_name if @specified_thread_name 43 | [:by_date, :by_time_of_day, :by_day_of_week, :per_thread, :commonly_used_messages, :commonly_used_words].each do |type| 44 | Utils.write_output_csv(output, 'analyzed/messages', type) { |output_file| output_files.push(output_file) } 45 | end 46 | { 47 | output_files: output_files, 48 | misc_data: { 49 | messages: { 50 | analysis_duration: (@end_time - @start_time).round(1), 51 | total_message_count: output[:total_message_count], 52 | average_words_per_message: output[:average_words_per_message], 53 | average_messages_per_day: output[:average_messages_per_day], 54 | } 55 | }, 56 | output_data: output 57 | } 58 | end 59 | 60 | def output 61 | [message_by_date_processor.output, message_by_content_processor.output(message_by_date_processor.output[:by_date].length)].reduce({}, :merge) 62 | end 63 | 64 | private 65 | 66 | def processors 67 | [message_by_content_processor, message_by_date_processor] 68 | end 69 | 70 | def processors_by_thread 71 | [message_prettifier_processor, message_by_content_processor] 72 | end 73 | 74 | def parse_message_file(file_path, thread_name, thread_id) 75 | csv_lines = Utils.read_csv_from_file(file_path) 76 | csv_lines.shift 77 | begin 78 | csv_lines = csv_lines.map do |csv_line| 79 | parsed_time = Time.parse(csv_line[:timestamp]) 80 | if @params[:normalize_time] == false 81 | timezone_offset = Time.zone_offset(Utils.timezone(@params)) 82 | else 83 | timezone_offset = @timezone_offsets_by_day[parsed_time.strftime(Utils::DATE_FORMAT)] || Time.zone_offset(Utils.timezone(@params)) 84 | end 85 | raise 'Invalid timezone' unless timezone_offset 86 | { 87 | date_time: parsed_time.utc + timezone_offset, 88 | message: csv_line[:contents], 89 | attachments: csv_line[:attachments] 90 | } 91 | end 92 | rescue StandardError => e 93 | puts "Could not parse csv line #{e}" 94 | return {} 95 | end 96 | new_data(csv_lines, thread_name, thread_id) 97 | end 98 | 99 | def new_data(lines, thread_name, thread_id) 100 | # discord backup only has complete data for past 6 months 101 | months = @params[:months_look_back] ? @params[:months_look_back].to_i : 6 102 | lines = lines.select{|line| line[:date_time].to_date > Date.today.prev_month(months) } 103 | processors_by_thread.each { |processor| processor.process_messages_by_thread(lines, thread_name, thread_id) } 104 | lines.each do |line| 105 | processors.each { |processor| processor.process(line) } 106 | end 107 | end 108 | end 109 | -------------------------------------------------------------------------------- /src/arg_parser.rb: -------------------------------------------------------------------------------- 1 | class ArgParser 2 | module ArgType 3 | STRING = 0 4 | INTEGER = 1 5 | BOOL = 2 6 | end 7 | ALLOWED_FLAGS = [ 8 | { flag: '--update-events', param_key: :update_events }, 9 | { flag: '--verify-events', param_key: :verify_events }, 10 | { flag: '--quick-run', param_key: :quick_run }, 11 | { flag: '--rebuild-binary', param_key: :rebuild_binary } 12 | ].freeze 13 | ALLOWED_FLAGS_WITH_ARG = [ 14 | { flag: '--data-path=', param_key: :data_path, type: ArgType::STRING }, 15 | { flag: '--word-min-length=', param_key: :word_min_length, type: ArgType::INTEGER }, 16 | { flag: '--months=', param_key: :months_look_back, type: ArgType::INTEGER }, 17 | { flag: '--thread-id=', param_key: :thread_id, type: ArgType::STRING }, 18 | { flag: '--timezone=', param_key: :timezone, type: ArgType::STRING }, 19 | { flag: '--normalize-time=', param_key: :normalize_time, type: ArgType::BOOL} 20 | ].freeze 21 | 22 | class << self 23 | def parse(args) 24 | parsed_params = {} 25 | ALLOWED_FLAGS.each do |param| 26 | if args.include? param[:flag] 27 | parsed_params[param[:param_key]] = true 28 | args.delete(param[:flag]) 29 | end 30 | end 31 | 32 | ALLOWED_FLAGS_WITH_ARG.each do |param| 33 | flag_with_arg = args.find { |arg| arg.start_with? param[:flag] } 34 | if flag_with_arg 35 | parsed_params[param[:param_key]] = extract_argument(flag_with_arg.dup, param[:flag], param[:type]) 36 | args.delete(flag_with_arg) 37 | end 38 | end 39 | 40 | raise "Unknown flags: #{args.join(', ')}" unless args.empty? 41 | parsed_params 42 | end 43 | 44 | def extract_argument(flag_with_arg, flag, type) 45 | flag_with_arg.slice! flag 46 | case type 47 | when ArgType::STRING 48 | flag_with_arg 49 | when ArgType::INTEGER 50 | flag_with_arg.to_i 51 | when ArgType::BOOL 52 | return true if flag_with_arg.casecmp('true').zero? 53 | return false if flag_with_arg.casecmp('false').zero? 54 | raise "#{flag_with_arg} is invalid boolean value" 55 | else 56 | raise "#{type} doesn't exist" 57 | end 58 | 59 | end 60 | end 61 | end 62 | -------------------------------------------------------------------------------- /src/processors/game_processor.rb: -------------------------------------------------------------------------------- 1 | class GameProcessor 2 | def initialize 3 | @games = Hash.new(0) 4 | end 5 | 6 | def process(activity, event_type) 7 | prepare_games_play_count(activity, event_type) 8 | end 9 | 10 | def prepare_games_play_count(activity, event_type) 11 | return unless ['launch_game', 'game_opened'].include? event_type 12 | case event_type 13 | when 'launch_game' 14 | game = activity['game'] 15 | when 'game_opened' 16 | game = activity['game_name'] 17 | end 18 | @games[game] += 1 19 | end 20 | 21 | def output 22 | { 23 | games_play_count: @games.sort_by { |_game, count| count }.reverse 24 | } 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /src/processors/message_by_date_processor.rb: -------------------------------------------------------------------------------- 1 | class MessageByDateProcessor 2 | attr_reader :messages_by_date 3 | 4 | def initialize 5 | @messages_by_date = Hash.new(0) 6 | @message_by_time_of_day = Hash.new(0) 7 | @message_by_day_of_week = Hash.new(0) 8 | end 9 | 10 | def process(line) 11 | prepare_message_by_time_of_day(line[:date_time]) 12 | prepare_message_by_day_of_week(line[:date_time]) 13 | prepare_messages_by_date(line[:date_time]) 14 | end 15 | 16 | def prepare_messages_by_date(time) 17 | @messages_by_date[time.strftime(Utils::DATE_FORMAT)] += 1 18 | end 19 | 20 | def prepare_message_by_time_of_day(time) 21 | @message_by_time_of_day[time.strftime(Utils::TIME_OF_DAY_FORMAT)] += 1 22 | end 23 | 24 | def prepare_message_by_day_of_week(time) 25 | @message_by_day_of_week[time.strftime(Utils::DAY_OF_WEEK_FORMAT).to_i] += 1 26 | end 27 | 28 | def fill_messages_by_date 29 | # TODO: make more efficient 30 | sorted = @messages_by_date.sort 31 | Date.parse(sorted.first[0]).upto(Date.parse(sorted.last[0])) do |date| 32 | date = date.strftime(Utils::DATE_FORMAT) 33 | found = sorted.find { |data| data[0] == date } 34 | sorted.push [date, 0] if found.nil? 35 | end 36 | sorted = sorted.sort 37 | @messages_by_date = sorted 38 | end 39 | 40 | def fill_messages_by_time_of_day 41 | # TODO: make more efficient 42 | sorted = @message_by_time_of_day.sort 43 | 0.upto(23).map do |hour| 44 | hour = hour < 10 ? "0#{hour}" : hour.to_s 45 | found = sorted.find { |data| data[0] == hour } 46 | sorted.push [hour, 0] if found.nil? 47 | end 48 | sorted = sorted.sort 49 | @message_by_time_of_day = sorted 50 | end 51 | 52 | def fill_messages_by_day_of_week 53 | # TODO: make more efficient 54 | sorted = @message_by_day_of_week.sort 55 | 0.upto(6).map do |day| 56 | found = sorted.find { |data| data[0] == day } 57 | sorted.push [day, 0] if found.nil? 58 | end 59 | sorted = sorted.sort 60 | @message_by_day_of_week = sorted 61 | end 62 | 63 | def output 64 | { 65 | by_date: fill_messages_by_date, 66 | by_time_of_day: fill_messages_by_time_of_day.map { |hour, count| [Utils.convert_24h_to_12h(hour), count] }, 67 | by_day_of_week: fill_messages_by_day_of_week.map { |day, count| [Date::DAYNAMES[day], count] } 68 | } 69 | end 70 | end 71 | -------------------------------------------------------------------------------- /src/processors/message_content_processor.rb: -------------------------------------------------------------------------------- 1 | # encoding: UTF-8 2 | 3 | class MessageByContentProcessor 4 | def initialize(params) 5 | @commonly_used_messages = Hash.new(0) 6 | @commonly_used_words = Hash.new(0) 7 | @messages_per_thread = {} 8 | @total_message_count = 0 9 | @total_word_count = 0 10 | @sentences = [] 11 | @params = params 12 | end 13 | 14 | def process(line) 15 | return if line[:message].nil? 16 | line[:message] = line[:message].force_encoding('UTF-8') 17 | prepare_total_word_count(line[:message]) 18 | prepare_commonly_used_messages(line[:message]) 19 | prepare_commonly_used_words(line[:message]) 20 | end 21 | 22 | def process_messages_by_thread(lines, thread_name, _thread_id) 23 | @messages_per_thread[thread_name] = lines.length 24 | @total_message_count += lines.length 25 | end 26 | 27 | def output(days_spent_on_discord) 28 | { 29 | commonly_used_messages: @commonly_used_messages.select { |_message, count| count >= 10 }.sort_by { |_message, count| count }.reverse, 30 | commonly_used_words: @commonly_used_words.select { |_word, count| count >= 10 }.sort_by { |_word, count| count }.reverse, 31 | per_thread: @messages_per_thread.sort_by { |_thread_name, count| count }.reverse, 32 | average_words_per_message: (@total_word_count.to_f / @total_message_count).round(2), 33 | average_messages_per_day: (@total_message_count.to_f / days_spent_on_discord).round(2), 34 | total_message_count: @total_message_count 35 | } 36 | end 37 | 38 | private 39 | def prepare_commonly_used_messages(message) 40 | @commonly_used_messages[message.strip.downcase] += 1 41 | end 42 | 43 | def prepare_commonly_used_words(message) 44 | message.strip.downcase.split(' ').each do |word| 45 | min_word_length = @params[:word_min_length] ? @params[:word_min_length].to_i : 5 46 | if word.length > min_word_length && !Utils.word_is_mention_or_emoji(word) 47 | @commonly_used_words[word] += 1 48 | end 49 | end 50 | end 51 | 52 | def prepare_total_word_count(message) 53 | @total_word_count += message.split(' ').length 54 | end 55 | end 56 | -------------------------------------------------------------------------------- /src/processors/message_prettifier_processor.rb: -------------------------------------------------------------------------------- 1 | class MessagePrettifierProcessor 2 | def process_messages_by_thread(lines, thread_name, thread_id) 3 | prettified_messages = lines.map do |line| 4 | "[#{line[:date_time].strftime('%m/%d/%Y %H:%M')}] #{line[:message]}" 5 | end.reverse.join("\n") 6 | Utils.write_output_txt(prettified_messages, 'prettified/messages', "#{thread_name}_#{thread_id}") 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /src/processors/reaction_processor.rb: -------------------------------------------------------------------------------- 1 | class ReactionProcessor 2 | UNKNOWN_REACTION_PATTERN = /\A[?]+\z/ 3 | 4 | def initialize 5 | @total_reactions_added = 0 6 | @total_reactions_removed = 0 7 | @reactions_count_hash = Hash.new(0) 8 | end 9 | 10 | def process(activity, event_type) 11 | prepare_reactions(activity, event_type) 12 | end 13 | 14 | def prepare_reactions(activity, event_type) 15 | return unless ['add_reaction', 'remove_reaction'].include? event_type 16 | if event_type == 'add_reaction' 17 | @total_reactions_added += 1 18 | @reactions_count_hash[activity['emoji_name']] += 1 19 | elsif event_type == 'remove_reaction' 20 | @total_reactions_removed += 1 21 | end 22 | end 23 | 24 | def output 25 | { 26 | total_reactions_added: @total_reactions_added, 27 | total_reactions_removed: @total_reactions_removed, 28 | reactions_by_use: @reactions_count_hash.reject { |key| key =~ UNKNOWN_REACTION_PATTERN }.sort_by { |_reaction, count| count }.reverse 29 | } 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /src/processors/session_processor.rb: -------------------------------------------------------------------------------- 1 | require 'tzinfo' 2 | 3 | class SessionProcessor 4 | def initialize 5 | @active_sessions = {} 6 | @total_session_length = 0 7 | @total_session_length_by_os = Hash.new(0) 8 | @total_session_length_by_location = Hash.new(0) 9 | @total_session_length_by_device = Hash.new(0) 10 | @timezone_offsets_by_day = Hash.new 11 | @total_sessions = 0 12 | @total_app_open = 0 13 | end 14 | 15 | def process(activity, event_type) 16 | prepare_session_data(activity, event_type) 17 | end 18 | 19 | def prepare_session_data(activity, event_type) 20 | return unless ['session_end', 'session_start', 'app_opened'].include? event_type 21 | if event_type == 'app_opened' 22 | @total_app_open += 1 23 | return 24 | end 25 | if event_type == 'session_start' 26 | @total_sessions += 1 27 | @active_sessions[activity['session']] ||= {} 28 | @active_sessions[activity['session']]['start'] = activity['timestamp'] 29 | elsif event_type == 'session_end' 30 | @active_sessions[activity['session']] ||= {} 31 | @active_sessions[activity['session']]['end'] = activity['timestamp'] 32 | end 33 | 34 | if @active_sessions[activity['session']]['start'] && @active_sessions[activity['session']]['end'] 35 | session_start = Time.parse(@active_sessions[activity['session']]['start']) 36 | session_end = Time.parse(@active_sessions[activity['session']]['end']) 37 | @active_sessions.delete(activity['session']) 38 | 39 | session_length = ((session_end - session_start) / 60).round(2) 40 | @total_session_length += session_length 41 | @total_session_length_by_os[activity['os']] += 1 42 | timezone_offset = TZInfo::Timezone.get(activity['time_zone']).current_period.offset.utc_total_offset if activity['time_zone'] 43 | @timezone_offsets_by_day[activity['timestamp'][0, 10]] ||= timezone_offset 44 | @total_session_length_by_location["#{activity['city'] || 'unknown'}:#{activity['region_code'] || 'unknown'}:#{activity['country_code'] || 'unknown'}"] += 1 45 | @total_session_length_by_device[activity['device'] || activity['os'] || 'unknown'] += 1 # no device information for desktop users, default to OS 46 | end 47 | end 48 | 49 | def output 50 | { 51 | time_by_os: @total_session_length_by_os.sort_by { |_os, count| count }.reverse, 52 | time_by_location: @total_session_length_by_location.sort_by { |_location, count| count }.reverse, 53 | time_by_device: @total_session_length_by_device.sort_by { |_device, count| count }.reverse, 54 | total_sessions: @total_sessions, 55 | total_app_open: @total_app_open, 56 | average_session_length: (@total_session_length / @total_sessions).round(2), 57 | timezone_offsets_by_day: @timezone_offsets_by_day 58 | } 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /src/processors/verify_events_processor.rb: -------------------------------------------------------------------------------- 1 | class VerifyEventsProcessor 2 | def initialize(verify, update) 3 | @event_list = [] 4 | @update = update 5 | @verify = verify 6 | end 7 | 8 | def process(_activity, event_type) 9 | prepare_event_list(event_type) 10 | end 11 | 12 | def prepare_event_list(event_type) 13 | return unless @update || @verify 14 | @event_list << event_type unless @event_list.include? event_type 15 | end 16 | 17 | def output 18 | return {} unless @update || @verify 19 | old_event_list = File.read('event_list.txt').split("\n") 20 | new_events = @event_list - old_event_list 21 | if new_events.length.zero? 22 | puts 'event_types list is up to date' 23 | exit 24 | end 25 | 26 | if @update 27 | new_event_list = old_event_list + new_events 28 | File.open('event_list.txt', 'w') do |file| 29 | file.write(new_event_list.sort.join("\n")) 30 | end 31 | puts "New event_types saved to current event list. \n #{new_events}" 32 | exit 33 | end 34 | 35 | if @verify 36 | puts "New event_types found.\nCheck if the new events have any interesting details, then re-run with --update-events to update the current event list.\n#{new_events}" 37 | exit 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /src/processors/voice_processor.rb: -------------------------------------------------------------------------------- 1 | class VoiceProcessor 2 | def initialize 3 | @total_voice_channel_connections = 0 4 | end 5 | 6 | def process(_activity, event_type) 7 | prepare_total_voice_channel_connections(event_type) 8 | end 9 | 10 | def prepare_total_voice_channel_connections(event_type) 11 | return unless ['join_voice_channel'].include? event_type 12 | @total_voice_channel_connections += 1 13 | end 14 | 15 | def output 16 | { 17 | total_voice_channel_connections: @total_voice_channel_connections 18 | } 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /src/result_renderer.rb: -------------------------------------------------------------------------------- 1 | class ResultRenderer 2 | attr_reader :output 3 | 4 | def initialize(final_output, activity_available) 5 | @output = final_output[:output_data] 6 | @html_template = ERB.new File.read("#{File.expand_path("../public/index.html.erb", __dir__)}"), nil, '%' 7 | @js_template = ERB.new File.read("#{File.expand_path("../public/index.js.erb", __dir__)}"), nil, '%' 8 | @activity_available = activity_available 9 | @misc_data = final_output[:misc_data] 10 | end 11 | 12 | def render 13 | @json_output = @output.to_json 14 | @username = @output[:username] 15 | @user_tag = @output[:user_tag] 16 | @specified_thread_name = @output[:specified_thread_name] 17 | @utc_offset = @output[:utc_offset] 18 | 19 | File.open('output/visualizations/index.js', 'w') { |file| file.write(@js_template.result(binding)) } 20 | File.open('output/visualizations/index.html', 'w') { |file| file.write(@html_template.result(binding)) } 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /src/utils.rb: -------------------------------------------------------------------------------- 1 | require 'json' 2 | require 'csv' 3 | require 'fileutils' 4 | require 'os' 5 | require 'smarter_csv' 6 | 7 | class Utils 8 | OUTPUT_PATH = './output'.freeze 9 | TIME_FORMAT_24H = '%l:00 %p'.freeze 10 | TIME_OF_DAY_FORMAT = '%H'.freeze 11 | DATE_FORMAT = '%F'.freeze 12 | DAY_OF_WEEK_FORMAT = '%w'.freeze 13 | SYSTEM_TIMEZONE = Time.now.zone.freeze 14 | HTML_PATH = 'output/visualizations/index.html'.freeze 15 | NIX_FILENAME_CHAR_BLACKLIST = /\//.freeze 16 | WINDOWS_FILENAME_CHAR_BLACKLIST = /[\/<>:"\\\|\?\*]/.freeze 17 | BLACKLISTED_REPLACEMENT = ''.freeze 18 | 19 | class << self 20 | def parse_funky_new_line_json_array(path) 21 | File.foreach(path) do |json_line| 22 | yield JSON.parse(json_line) 23 | end 24 | end 25 | 26 | def timezone(params) 27 | params[:timezone] || SYSTEM_TIMEZONE 28 | end 29 | 30 | def zone_offset_to_utc_offset(zone_offset) 31 | negative = zone_offset < 0 32 | hour_offset = (zone_offset.abs / 3600).to_s 33 | hour_offset = "0#{hour_offset}" if hour_offset.length == 1 34 | minute_offset = (zone_offset.abs % (3600) / 60).to_s 35 | minute_offset = "0#{minute_offset}" if minute_offset.length == 1 36 | "#{negative ? '-' : '+'}#{hour_offset}:#{minute_offset}" 37 | end 38 | 39 | def parse_json_from_file(path) 40 | JSON.parse(File.read(path)) 41 | rescue JSON::ParserError, Errno::ENOENT => e 42 | raise " Could not parse #{path}. #{e.to_s[0..50]}\n" 43 | end 44 | 45 | def read_csv_from_file(path) 46 | SmarterCSV.process(path, :convert_values_to_numeric => false) 47 | rescue Errno::ENOENT 48 | raise "Could not parse #{path}\n" 49 | end 50 | 51 | def convert_24h_to_12h(hour) 52 | Time.parse("#{hour}:00").strftime(TIME_FORMAT_24H) 53 | end 54 | 55 | def get_num_of_directories(path) 56 | Dir.entries(path).select { |entry| (File.directory? File.join(path, entry)) && !(['.', '..'].include? entry) }.length 57 | end 58 | 59 | def get_num_of_files(path) 60 | Dir.entries(path).select { |entry| (File.file? File.join(path, entry)) && !(['.', '..'].include? entry) }.length 61 | end 62 | 63 | def write_output_txt(output, directory, file_name) 64 | # directory is an argument we control. 65 | # don't mess it up and put weird characters in it. 66 | # however, file_name is at the mercy of discord users, 67 | # so we sanitize the weird shit that can appear like '/' 68 | if OS.windows? || OS::Underlying.windows? 69 | sanitized_file_name = 70 | file_name.gsub(WINDOWS_FILENAME_CHAR_BLACKLIST, BLACKLISTED_REPLACEMENT) 71 | else 72 | sanitized_file_name = 73 | file_name.gsub(NIX_FILENAME_CHAR_BLACKLIST, BLACKLISTED_REPLACEMENT) 74 | end 75 | output_file = "#{sanitized_file_name}.txt" 76 | dir_path = "#{OUTPUT_PATH}/#{directory}" 77 | FileUtils.mkdir_p dir_path 78 | File.open("#{dir_path}/#{output_file}", 'w') do |file| 79 | file.write(output) 80 | end 81 | end 82 | 83 | def write_output_csv(output, directory, type) 84 | unless output.key? type 85 | puts "Could not find output key: #{type}" 86 | return 87 | end 88 | output_file = "#{type}.csv" 89 | dir_path = "#{OUTPUT_PATH}/#{directory}" 90 | FileUtils.mkdir_p dir_path 91 | CSV.open("#{dir_path}/#{output_file}", 'w') do |csv| 92 | output[type].each do |key, value| 93 | csv << [key, value] 94 | end 95 | end 96 | yield "#{directory}/#{output_file}" 97 | end 98 | def isWSL? #no other way than to grep 99 | return OS.posix? && `grep -c Microsoft /proc/version`.to_i > 0 #https://github.com/Microsoft/WSL/issues/423#issuecomment-221627364 100 | end 101 | def open_html_graphs 102 | if OS.windows? && OS::Underlying.windows? #normal windows 103 | `explorer file://#{File.expand_path("#{HTML_PATH}", File.dirname(ENV["OCRA_EXECUTABLE"]))}` if ENV["OCRA_EXECUTABLE"] 104 | `explorer file://#{File.expand_path("../#{HTML_PATH}", File.dirname(__FILE__))}` unless ENV["OCRA_EXECUTABLE"] 105 | elsif (!OS.windows?) && OS::Underlying.windows? #cygwin, etc 106 | `xdg-open #{HTML_PATH}` #need to test on cygwin and others 107 | elsif OS.mac? #Mac, OS x 108 | `open #{HTML_PATH}` 109 | elsif isWSL? #specifically for WSL 110 | #converts from posix naming system to windows naming system (wslpath) 111 | #explorer.exe can be run from WSL 112 | `explorer.exe file://#{`wslpath -m #{File.expand_path("../#{HTML_PATH}", File.dirname("OCRA_EXECUTABLE"))}`} ` if ENV["OCRA_EXECUTABLE"] #need to test ocra and WSL together 113 | `explorer.exe file://#{`wslpath -m #{File.expand_path("../#{HTML_PATH}", File.dirname(__FILE__))}`} ` unless ENV["OCRA_EXECUTABLE"] 114 | elsif OS.posix? #unix, linux 115 | `xdg-open #{HTML_PATH}` 116 | end 117 | end 118 | 119 | def word_is_mention_or_emoji(word) 120 | word =~ /<:[a-zA-Z0-9]+:[0-9]+>/ || word =~ /<@![0-9]+>/ || word =~ /<@[0-9]+>/ 121 | end 122 | 123 | end 124 | end 125 | --------------------------------------------------------------------------------