Discord: Enable Light Mode

Enables light mode on Discord.

// ==UserScript==
// @name         Discord: Enable Light Mode
// @description  Enables light mode on Discord.
// @version      1.0
// @author       Midnight007
// @namespace    https://google.com
// @match        *://*/*
// @run-at       document-start
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
  "use strict";

  // Get the Discord client.
  var Discord = require("discord.js");

  // Create a new Discord client.
  var client = new Discord.Client();

  // When the client is ready, enable light mode.
  client.on("ready", async () => {
    // Get the current theme.
    var theme = await client.user.settings.get("theme");

    // If the current theme is dark, change it to light.
    if (theme === "dark") {
      await client.user.settings.set("theme", "light");
    }
  });

})();