[
  {
    "path": ".gitattributes",
    "content": "# Auto detect text files and perform LF normalization\n* text=auto\n"
  },
  {
    "path": ".gitignore",
    "content": "trash/\ntest.py\nconfig.ini\n\n.floo\n.flooignore\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n#  Usually these files are written by a python script from a template\n#  before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n.hypothesis/\n.pytest_cache/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# pyenv\n.python-version\n\n# celery beat schedule file\ncelerybeat-schedule\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n\n"
  },
  {
    "path": ".idea/YukikoBot.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"PYTHON_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\">\n    <content url=\"file://$MODULE_DIR$\" />\n    <orderEntry type=\"inheritedJdk\" />\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n  </component>\n</module>"
  },
  {
    "path": ".idea/deployment.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"PublishConfigData\" autoUpload=\"Always\" serverName=\"Google VM\">\n    <serverData>\n      <paths name=\"Google VM\">\n        <serverdata>\n          <mappings>\n            <mapping deploy=\"YukikoBot\" local=\"$PROJECT_DIR$\" web=\"/\" />\n          </mappings>\n        </serverdata>\n      </paths>\n    </serverData>\n    <option name=\"myAutoUpload\" value=\"ALWAYS\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/misc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectRootManager\" version=\"2\" project-jdk-name=\"Python 3.6 (YukikoBot)\" project-jdk-type=\"Python SDK\" />\n</project>"
  },
  {
    "path": ".idea/modules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectModuleManager\">\n    <modules>\n      <module fileurl=\"file://$PROJECT_DIR$/.idea/YukikoBot.iml\" filepath=\"$PROJECT_DIR$/.idea/YukikoBot.iml\" />\n    </modules>\n  </component>\n</project>"
  },
  {
    "path": ".idea/vcs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping directory=\"$PROJECT_DIR$\" vcs=\"Git\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/webServers.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"WebServers\">\n    <option name=\"servers\">\n      <webServer id=\"9238c970-20ed-469b-b45f-93cbb7d57bdd\" name=\"Google VM\" url=\"http://35.230.130.161\">\n        <fileTransfer host=\"35.230.130.161\" port=\"22\" privateKey=\"D:\\GoogleVM\" rootFolder=\"/home/trapsarehot69\" accessType=\"SFTP\" keyPair=\"true\">\n          <advancedOptions>\n            <advancedOptions dataProtectionLevel=\"Private\" shareSSLContext=\"true\" />\n          </advancedOptions>\n          <option name=\"port\" value=\"22\" />\n        </fileTransfer>\n      </webServer>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/workspace.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"BookmarkManager\">\n    <bookmark url=\"file://$PROJECT_DIR$/cogs/text.py\" line=\"95\" />\n    <bookmark url=\"file://$PROJECT_DIR$/cogs/guild.py\" line=\"37\" />\n  </component>\n  <component name=\"ChangeListManager\">\n    <list default=\"true\" id=\"6407fb93-1db4-423e-a29b-b48c10419958\" name=\"Default\" comment=\"\" />\n    <option name=\"EXCLUDED_CONVERTED_TO_IGNORED\" value=\"true\" />\n    <option name=\"SHOW_DIALOG\" value=\"false\" />\n    <option name=\"HIGHLIGHT_CONFLICTS\" value=\"true\" />\n    <option name=\"HIGHLIGHT_NON_ACTIVE_CHANGELIST\" value=\"false\" />\n    <option name=\"LAST_RESOLUTION\" value=\"IGNORE\" />\n  </component>\n  <component name=\"CoverageDataManager\">\n    <SUITE FILE_PATH=\"coverage/YukikoBot$frontend_pyw.coverage\" NAME=\"frontend.pyw Coverage Results\" MODIFIED=\"1541334178174\" SOURCE_PROVIDER=\"com.intellij.coverage.DefaultCoverageFileProvider\" RUNNER=\"coverage.py\" COVERAGE_BY_TEST_ENABLED=\"true\" COVERAGE_TRACING_ENABLED=\"false\" WORKING_DIRECTORY=\"$PROJECT_DIR$\" />\n    <SUITE FILE_PATH=\"coverage/YukikoBot$yuki.coverage\" NAME=\"yuki Coverage Results\" MODIFIED=\"1537384732830\" SOURCE_PROVIDER=\"com.intellij.coverage.DefaultCoverageFileProvider\" RUNNER=\"coverage.py\" COVERAGE_BY_TEST_ENABLED=\"true\" COVERAGE_TRACING_ENABLED=\"false\" WORKING_DIRECTORY=\"$PROJECT_DIR$\" />\n  </component>\n  <component name=\"FUSProjectUsageTrigger\">\n    <session id=\"-762038745\">\n      <usages-collector id=\"statistics.lifecycle.project\">\n        <counts>\n          <entry key=\"project.closed\" value=\"15\" />\n          <entry key=\"project.open.time.21\" value=\"3\" />\n          <entry key=\"project.open.time.22\" value=\"2\" />\n          <entry key=\"project.open.time.23\" value=\"5\" />\n          <entry key=\"project.open.time.24\" value=\"4\" />\n          <entry key=\"project.open.time.25\" value=\"10\" />\n          <entry key=\"project.open.time.26\" value=\"6\" />\n          <entry key=\"project.open.time.27\" value=\"1\" />\n          <entry key=\"project.open.time.28\" value=\"1\" />\n          <entry key=\"project.open.time.29\" value=\"5\" />\n          <entry key=\"project.open.time.30\" value=\"3\" />\n          <entry key=\"project.open.time.31\" value=\"2\" />\n          <entry key=\"project.open.time.33\" value=\"2\" />\n          <entry key=\"project.open.time.34\" value=\"1\" />\n          <entry key=\"project.open.time.35\" value=\"1\" />\n          <entry key=\"project.open.time.38\" value=\"1\" />\n          <entry key=\"project.open.time.41\" value=\"1\" />\n          <entry key=\"project.open.time.43\" value=\"1\" />\n          <entry key=\"project.open.time.47\" value=\"1\" />\n          <entry key=\"project.open.time.48\" value=\"1\" />\n          <entry key=\"project.open.time.5\" value=\"1\" />\n          <entry key=\"project.open.time.6\" value=\"2\" />\n          <entry key=\"project.open.time.692\" value=\"1\" />\n          <entry key=\"project.open.time.8\" value=\"1\" />\n          <entry key=\"project.opened\" value=\"56\" />\n        </counts>\n      </usages-collector>\n      <usages-collector id=\"statistics.file.extensions.edit\">\n        <counts>\n          <entry key=\"Python Console\" value=\"9\" />\n          <entry key=\"py\" value=\"19316\" />\n          <entry key=\"pyw\" value=\"4\" />\n          <entry key=\"vmoptions\" value=\"4\" />\n        </counts>\n      </usages-collector>\n      <usages-collector id=\"statistics.file.types.edit\">\n        <counts>\n          <entry key=\"PLAIN_TEXT\" value=\"4\" />\n          <entry key=\"Python\" value=\"19329\" />\n        </counts>\n      </usages-collector>\n      <usages-collector id=\"statistics.file.extensions.open\">\n        <counts>\n          <entry key=\"py\" value=\"48\" />\n          <entry key=\"pyw\" value=\"3\" />\n          <entry key=\"vmoptions\" value=\"2\" />\n        </counts>\n      </usages-collector>\n      <usages-collector id=\"statistics.file.types.open\">\n        <counts>\n          <entry key=\"PLAIN_TEXT\" value=\"2\" />\n          <entry key=\"Python\" value=\"51\" />\n        </counts>\n      </usages-collector>\n    </session>\n  </component>\n  <component name=\"FavoritesManager\">\n    <favorites_list name=\"YukikoBot\" />\n  </component>\n  <component name=\"FileEditorManager\">\n    <leaf SIDE_TABS_SIZE_LIMIT_KEY=\"300\">\n      <file pinned=\"false\" current-in-tab=\"false\">\n        <entry file=\"file://$PROJECT_DIR$/cogs/text.py\">\n          <provider selected=\"true\" editor-type-id=\"text-editor\">\n            <state relative-caret-position=\"153\">\n              <caret line=\"19\" column=\"43\" selection-start-line=\"19\" selection-start-column=\"43\" selection-end-line=\"19\" selection-end-column=\"43\" />\n              <folding>\n                <element signature=\"e#0#14#0\" expanded=\"true\" />\n              </folding>\n            </state>\n          </provider>\n        </entry>\n      </file>\n      <file pinned=\"false\" current-in-tab=\"false\">\n        <entry file=\"file://$PROJECT_DIR$/cogs/nsfw.py\">\n          <provider selected=\"true\" editor-type-id=\"text-editor\">\n            <state relative-caret-position=\"714\">\n              <caret line=\"51\" selection-start-line=\"51\" selection-end-line=\"51\" />\n              <folding>\n                <element signature=\"e#0#14#0\" expanded=\"true\" />\n              </folding>\n            </state>\n          </provider>\n        </entry>\n      </file>\n      <file pinned=\"false\" current-in-tab=\"false\">\n        <entry file=\"file://$PROJECT_DIR$/cogs/coins.py\">\n          <provider selected=\"true\" editor-type-id=\"text-editor\">\n            <state relative-caret-position=\"68\">\n              <caret line=\"9\" column=\"57\" selection-start-line=\"9\" selection-start-column=\"57\" selection-end-line=\"9\" selection-end-column=\"57\" />\n              <folding>\n                <element signature=\"e#0#14#0\" expanded=\"true\" />\n              </folding>\n            </state>\n          </provider>\n        </entry>\n      </file>\n      <file pinned=\"false\" current-in-tab=\"true\">\n        <entry file=\"file://$PROJECT_DIR$/cogs/guild.py\">\n          <provider selected=\"true\" editor-type-id=\"text-editor\">\n            <state relative-caret-position=\"617\">\n              <caret line=\"169\" column=\"53\" selection-start-line=\"169\" selection-start-column=\"53\" selection-end-line=\"169\" selection-end-column=\"53\" />\n              <folding>\n                <element signature=\"e#0#14#0\" expanded=\"true\" />\n                <marker date=\"1538856021276\" expanded=\"true\" signature=\"4617:4622\" ph=\"...\" />\n              </folding>\n            </state>\n          </provider>\n        </entry>\n      </file>\n      <file pinned=\"false\" current-in-tab=\"false\">\n        <entry file=\"file://$PROJECT_DIR$/cogs/utils.py\">\n          <provider selected=\"true\" editor-type-id=\"text-editor\">\n            <state relative-caret-position=\"5134\">\n              <caret line=\"312\" column=\"11\" selection-start-line=\"312\" selection-start-column=\"11\" selection-end-line=\"312\" selection-end-column=\"11\" />\n            </state>\n          </provider>\n        </entry>\n      </file>\n      <file pinned=\"false\" current-in-tab=\"false\">\n        <entry file=\"file://$PROJECT_DIR$/cogs/stars.py\">\n          <provider selected=\"true\" editor-type-id=\"text-editor\">\n            <state relative-caret-position=\"833\">\n              <caret line=\"55\" column=\"38\" selection-start-line=\"55\" selection-start-column=\"38\" selection-end-line=\"55\" selection-end-column=\"38\" />\n              <folding>\n                <element signature=\"e#0#14#0\" expanded=\"true\" />\n                <marker date=\"1538235998449\" expanded=\"true\" signature=\"692:698\" ph=\"...\" />\n              </folding>\n            </state>\n          </provider>\n        </entry>\n      </file>\n      <file pinned=\"false\" current-in-tab=\"false\">\n        <entry file=\"file://$PROJECT_DIR$/cogs/info.py\">\n          <provider selected=\"true\" editor-type-id=\"text-editor\">\n            <state relative-caret-position=\"1241\">\n              <caret line=\"81\" column=\"26\" selection-start-line=\"81\" selection-start-column=\"26\" selection-end-line=\"81\" selection-end-column=\"33\" />\n              <folding>\n                <element signature=\"e#0#14#0\" expanded=\"true\" />\n              </folding>\n            </state>\n          </provider>\n        </entry>\n      </file>\n      <file pinned=\"false\" current-in-tab=\"false\">\n        <entry file=\"file://$PROJECT_DIR$/cogs/owner.py\">\n          <provider selected=\"true\" editor-type-id=\"text-editor\">\n            <state relative-caret-position=\"1768\">\n              <caret line=\"120\" column=\"12\" selection-start-line=\"120\" selection-start-column=\"12\" selection-end-line=\"120\" selection-end-column=\"12\" />\n              <folding>\n                <element signature=\"e#0#14#0\" expanded=\"true\" />\n                <marker date=\"1538265090602\" expanded=\"true\" signature=\"707:713\" ph=\"...\" />\n              </folding>\n            </state>\n          </provider>\n        </entry>\n      </file>\n      <file pinned=\"false\" current-in-tab=\"false\">\n        <entry file=\"file://$PROJECT_DIR$/yuki.py\">\n          <provider selected=\"true\" editor-type-id=\"text-editor\">\n            <state relative-caret-position=\"-964\">\n              <caret line=\"92\" column=\"56\" selection-start-line=\"92\" selection-start-column=\"56\" selection-end-line=\"92\" selection-end-column=\"56\" />\n              <folding>\n                <element signature=\"e#0#14#0\" expanded=\"true\" />\n              </folding>\n            </state>\n          </provider>\n        </entry>\n      </file>\n      <file pinned=\"false\" current-in-tab=\"false\">\n        <entry file=\"file://$PROJECT_DIR$/cogs/tests.py\">\n          <provider selected=\"true\" editor-type-id=\"text-editor\">\n            <state relative-caret-position=\"782\">\n              <caret line=\"49\" column=\"82\" selection-start-line=\"49\" selection-start-column=\"82\" selection-end-line=\"49\" selection-end-column=\"82\" />\n            </state>\n          </provider>\n        </entry>\n      </file>\n    </leaf>\n  </component>\n  <component name=\"FileTemplateManagerImpl\">\n    <option name=\"RECENT_TEMPLATES\">\n      <list>\n        <option value=\"Setup Script\" />\n        <option value=\"Python Script\" />\n      </list>\n    </option>\n  </component>\n  <component name=\"FindInProjectRecents\">\n    <findStrings>\n      <find>about</find>\n      <find>attac</find>\n      <find>with ctx.typing():</find>\n      <find>py</find>\n      <find>thonk</find>\n      <find>self.getImage</find>\n      <find>#800000</find>\n      <find>#80000</find>\n      <find>0x8000</find>\n      <find>0x800000</find>\n      <find>yuki.color</find>\n      <find>nick</find>\n      <find>.format</find>\n      <find>format</find>\n      <find>Fil</find>\n      <find>session</find>\n      <find>clientSession</find>\n      <find>\\U</find>\n      <find>&quot;&quot;.join(</find>\n      <find>\\u</find>\n      <find>== None:</find>\n      <find>getImage</find>\n      <find>imgBytes</find>\n      <find>outputBuffer</find>\n      <find>embedColor</find>\n      <find>formatTime</find>\n      <find>starttyping</find>\n      <find>sendError</find>\n      <find>prefix</find>\n      <find>if len(gld.channels) &lt;= 100:</find>\n    </findStrings>\n    <replaceStrings>\n      <replace>guild</replace>\n      <replace>logging.info</replace>\n      <replace>@commands.command</replace>\n      <replace>async with ctx.typing():</replace>\n      <replace>yuki.color</replace>\n      <replace>ykColor</replace>\n      <replace>session</replace>\n      <replace>\\u</replace>\n      <replace>''.join(</replace>\n      <replace>\\U</replace>\n      <replace>get_image</replace>\n      <replace>img_bytes</replace>\n      <replace>output_buf</replace>\n      <replace>get_check</replace>\n      <replace>embed_color</replace>\n      <replace>guild_created</replace>\n      <replace>format_time</replace>\n      <replace>send_error</replace>\n      <replace>if len(gld.channels) &lt;= 500:</replace>\n    </replaceStrings>\n    <dirStrings>\n      <dir>D:\\GitHub\\YukikoBot\\cogs</dir>\n    </dirStrings>\n  </component>\n  <component name=\"Git.Settings\">\n    <option name=\"RECENT_GIT_ROOT_PATH\" value=\"$PROJECT_DIR$\" />\n  </component>\n  <component name=\"IdeDocumentHistory\">\n    <option name=\"CHANGED_PATHS\">\n      <list>\n        <option value=\"$PROJECT_DIR$/test.py\" />\n        <option value=\"$PROJECT_DIR$/../ChocChip/core.py\" />\n        <option value=\"$PROJECT_DIR$/main.py\" />\n        <option value=\"$PROJECT_DIR$/frontend.py\" />\n        <option value=\"$USER_HOME$/Desktop/cogsss.py\" />\n        <option value=\"$USER_HOME$/Desktop/gaer.py\" />\n        <option value=\"$PROJECT_DIR$/image.py\" />\n        <option value=\"$USER_HOME$/Desktop/rominfo test/rominfo.py\" />\n        <option value=\"D:/PokéFuser/fuser.py\" />\n        <option value=\"$PROJECT_DIR$/commands_archive.py\" />\n        <option value=\"$PROJECT_DIR$/owner.py\" />\n        <option value=\"$PROJECT_DIR$/connect4.py\" />\n        <option value=\"$PROJECT_DIR$/setup.py\" />\n        <option value=\"$PROJECT_DIR$/minigames.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/fun.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/experimental.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/moderation.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/mod.py\" />\n        <option value=\"$PROJECT_DIR$/config.ini\" />\n        <option value=\"$USER_HOME$/Desktop/litebot.py\" />\n        <option value=\"$APPLICATION_CONFIG_DIR$/pycharm64.exe.vmoptions\" />\n        <option value=\"$PROJECT_DIR$/frontend.pyw\" />\n        <option value=\"$PROJECT_DIR$/cogs/copypasta.py\" />\n        <option value=\"$PROJECT_DIR$/trash/commands_archive.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/text.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/image.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/utils.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/coins.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/stars.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/owner.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/tests.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/info.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/nsfw.py\" />\n        <option value=\"$PROJECT_DIR$/cogs/guild.py\" />\n        <option value=\"$PROJECT_DIR$/yuki.py\" />\n      </list>\n    </option>\n  </component>\n  <component name=\"JsBuildToolGruntFileManager\" detection-done=\"true\" sorting=\"DEFINITION_ORDER\" />\n  <component name=\"JsBuildToolPackageJson\" detection-done=\"true\" sorting=\"DEFINITION_ORDER\" />\n  <component name=\"JsGulpfileManager\">\n    <detection-done>true</detection-done>\n    <sorting>DEFINITION_ORDER</sorting>\n  </component>\n  <component name=\"NodePackageJsonFileManager\">\n    <packageJsonPaths>\n      <path value=\"$PROJECT_DIR$/venv/Lib/site-packages/pre_commit/resources/empty_template/package.json\" />\n    </packageJsonPaths>\n  </component>\n  <component name=\"ProjectFrameBounds\" extendedState=\"6\">\n    <option name=\"x\" value=\"903\" />\n    <option name=\"y\" value=\"7\" />\n    <option name=\"width\" value=\"974\" />\n    <option name=\"height\" value=\"1040\" />\n  </component>\n  <component name=\"ProjectView\">\n    <navigator proportions=\"\" version=\"1\">\n      <foldersAlwaysOnTop value=\"true\" />\n    </navigator>\n    <panes />\n  </component>\n  <component name=\"PropertiesComponent\">\n    <property name=\"WebServerToolWindowFactoryState\" value=\"false\" />\n    <property name=\"last_opened_file_path\" value=\"$PROJECT_DIR$/cogs\" />\n    <property name=\"settings.editor.selected.configurable\" value=\"preferences.pluginManager\" />\n  </component>\n  <component name=\"RecentsManager\">\n    <key name=\"CopyFile.RECENT_KEYS\">\n      <recent name=\"C:\\Users\\yarsa\\PycharmProjects\\YukikoBot\" />\n    </key>\n  </component>\n  <component name=\"RunDashboard\">\n    <option name=\"ruleStates\">\n      <list>\n        <RuleState>\n          <option name=\"name\" value=\"ConfigurationTypeDashboardGroupingRule\" />\n        </RuleState>\n        <RuleState>\n          <option name=\"name\" value=\"StatusDashboardGroupingRule\" />\n        </RuleState>\n      </list>\n    </option>\n  </component>\n  <component name=\"RunManager\" selected=\"Python.frontend.pyw\">\n    <configuration name=\"connect4\" type=\"PythonConfigurationType\" factoryName=\"Python\" temporary=\"true\">\n      <module name=\"YukikoBot\" />\n      <option name=\"INTERPRETER_OPTIONS\" value=\"\" />\n      <option name=\"PARENT_ENVS\" value=\"true\" />\n      <envs>\n        <env name=\"PYTHONUNBUFFERED\" value=\"1\" />\n      </envs>\n      <option name=\"SDK_HOME\" value=\"\" />\n      <option name=\"WORKING_DIRECTORY\" value=\"$PROJECT_DIR$\" />\n      <option name=\"IS_MODULE_SDK\" value=\"true\" />\n      <option name=\"ADD_CONTENT_ROOTS\" value=\"true\" />\n      <option name=\"ADD_SOURCE_ROOTS\" value=\"true\" />\n      <EXTENSION ID=\"PythonCoverageRunConfigurationExtension\" runner=\"coverage.py\" />\n      <option name=\"SCRIPT_NAME\" value=\"$PROJECT_DIR$/connect4.py\" />\n      <option name=\"PARAMETERS\" value=\"\" />\n      <option name=\"SHOW_COMMAND_LINE\" value=\"false\" />\n      <option name=\"EMULATE_TERMINAL\" value=\"false\" />\n      <option name=\"MODULE_MODE\" value=\"false\" />\n      <option name=\"REDIRECT_INPUT\" value=\"false\" />\n      <option name=\"INPUT_FILE\" value=\"\" />\n      <method v=\"2\" />\n    </configuration>\n    <configuration name=\"frontend.pyw\" type=\"PythonConfigurationType\" factoryName=\"Python\" temporary=\"true\">\n      <module name=\"YukikoBot\" />\n      <option name=\"INTERPRETER_OPTIONS\" value=\"\" />\n      <option name=\"PARENT_ENVS\" value=\"true\" />\n      <envs>\n        <env name=\"PYTHONUNBUFFERED\" value=\"1\" />\n      </envs>\n      <option name=\"SDK_HOME\" value=\"\" />\n      <option name=\"WORKING_DIRECTORY\" value=\"$PROJECT_DIR$\" />\n      <option name=\"IS_MODULE_SDK\" value=\"true\" />\n      <option name=\"ADD_CONTENT_ROOTS\" value=\"true\" />\n      <option name=\"ADD_SOURCE_ROOTS\" value=\"true\" />\n      <EXTENSION ID=\"PythonCoverageRunConfigurationExtension\" runner=\"coverage.py\" />\n      <option name=\"SCRIPT_NAME\" value=\"$PROJECT_DIR$/frontend.pyw\" />\n      <option name=\"PARAMETERS\" value=\"\" />\n      <option name=\"SHOW_COMMAND_LINE\" value=\"false\" />\n      <option name=\"EMULATE_TERMINAL\" value=\"false\" />\n      <option name=\"MODULE_MODE\" value=\"false\" />\n      <option name=\"REDIRECT_INPUT\" value=\"false\" />\n      <option name=\"INPUT_FILE\" value=\"\" />\n      <method v=\"2\" />\n    </configuration>\n    <configuration name=\"gae\" type=\"PythonConfigurationType\" factoryName=\"Python\" temporary=\"true\">\n      <module name=\"YukikoBot\" />\n      <option name=\"INTERPRETER_OPTIONS\" value=\"\" />\n      <option name=\"PARENT_ENVS\" value=\"true\" />\n      <envs>\n        <env name=\"PYTHONUNBUFFERED\" value=\"1\" />\n      </envs>\n      <option name=\"SDK_HOME\" value=\"\" />\n      <option name=\"WORKING_DIRECTORY\" value=\"$PROJECT_DIR$/trash\" />\n      <option name=\"IS_MODULE_SDK\" value=\"true\" />\n      <option name=\"ADD_CONTENT_ROOTS\" value=\"true\" />\n      <option name=\"ADD_SOURCE_ROOTS\" value=\"true\" />\n      <EXTENSION ID=\"PythonCoverageRunConfigurationExtension\" runner=\"coverage.py\" />\n      <option name=\"SCRIPT_NAME\" value=\"$PROJECT_DIR$/trash/gae.py\" />\n      <option name=\"PARAMETERS\" value=\"\" />\n      <option name=\"SHOW_COMMAND_LINE\" value=\"false\" />\n      <option name=\"EMULATE_TERMINAL\" value=\"false\" />\n      <option name=\"MODULE_MODE\" value=\"false\" />\n      <option name=\"REDIRECT_INPUT\" value=\"false\" />\n      <option name=\"INPUT_FILE\" value=\"\" />\n      <method v=\"2\" />\n    </configuration>\n    <configuration name=\"minigames\" type=\"PythonConfigurationType\" factoryName=\"Python\" temporary=\"true\">\n      <module name=\"YukikoBot\" />\n      <option name=\"INTERPRETER_OPTIONS\" value=\"\" />\n      <option name=\"PARENT_ENVS\" value=\"true\" />\n      <envs>\n        <env name=\"PYTHONUNBUFFERED\" value=\"1\" />\n      </envs>\n      <option name=\"SDK_HOME\" value=\"\" />\n      <option name=\"WORKING_DIRECTORY\" value=\"$PROJECT_DIR$\" />\n      <option name=\"IS_MODULE_SDK\" value=\"true\" />\n      <option name=\"ADD_CONTENT_ROOTS\" value=\"true\" />\n      <option name=\"ADD_SOURCE_ROOTS\" value=\"true\" />\n      <EXTENSION ID=\"PythonCoverageRunConfigurationExtension\" runner=\"coverage.py\" />\n      <option name=\"SCRIPT_NAME\" value=\"$PROJECT_DIR$/minigames.py\" />\n      <option name=\"PARAMETERS\" value=\"\" />\n      <option name=\"SHOW_COMMAND_LINE\" value=\"false\" />\n      <option name=\"EMULATE_TERMINAL\" value=\"false\" />\n      <option name=\"MODULE_MODE\" value=\"false\" />\n      <option name=\"REDIRECT_INPUT\" value=\"false\" />\n      <option name=\"INPUT_FILE\" value=\"\" />\n      <method v=\"2\" />\n    </configuration>\n    <configuration name=\"yuki\" type=\"PythonConfigurationType\" factoryName=\"Python\" temporary=\"true\">\n      <module name=\"YukikoBot\" />\n      <option name=\"INTERPRETER_OPTIONS\" value=\"\" />\n      <option name=\"PARENT_ENVS\" value=\"true\" />\n      <envs>\n        <env name=\"PYTHONUNBUFFERED\" value=\"1\" />\n      </envs>\n      <option name=\"SDK_HOME\" value=\"\" />\n      <option name=\"WORKING_DIRECTORY\" value=\"$PROJECT_DIR$\" />\n      <option name=\"IS_MODULE_SDK\" value=\"true\" />\n      <option name=\"ADD_CONTENT_ROOTS\" value=\"true\" />\n      <option name=\"ADD_SOURCE_ROOTS\" value=\"true\" />\n      <EXTENSION ID=\"PythonCoverageRunConfigurationExtension\" runner=\"coverage.py\" />\n      <option name=\"SCRIPT_NAME\" value=\"$PROJECT_DIR$/yuki.py\" />\n      <option name=\"PARAMETERS\" value=\"\" />\n      <option name=\"SHOW_COMMAND_LINE\" value=\"false\" />\n      <option name=\"EMULATE_TERMINAL\" value=\"false\" />\n      <option name=\"MODULE_MODE\" value=\"false\" />\n      <option name=\"REDIRECT_INPUT\" value=\"false\" />\n      <option name=\"INPUT_FILE\" value=\"\" />\n      <method v=\"2\" />\n    </configuration>\n    <list>\n      <item itemvalue=\"Python.frontend.pyw\" />\n      <item itemvalue=\"Python.connect4\" />\n      <item itemvalue=\"Python.gae\" />\n      <item itemvalue=\"Python.minigames\" />\n      <item itemvalue=\"Python.yuki\" />\n    </list>\n    <recent_temporary>\n      <list>\n        <item itemvalue=\"Python.frontend.pyw\" />\n        <item itemvalue=\"Python.yuki\" />\n        <item itemvalue=\"Python.minigames\" />\n        <item itemvalue=\"Python.gae\" />\n        <item itemvalue=\"Python.connect4\" />\n      </list>\n    </recent_temporary>\n  </component>\n  <component name=\"SvnConfiguration\">\n    <configuration />\n  </component>\n  <component name=\"TaskManager\">\n    <task active=\"true\" id=\"Default\" summary=\"Default task\">\n      <changelist id=\"6407fb93-1db4-423e-a29b-b48c10419958\" name=\"Default\" comment=\"\" />\n      <created>1526774209823</created>\n      <option name=\"number\" value=\"Default\" />\n      <option name=\"presentableId\" value=\"Default\" />\n      <updated>1526774209823</updated>\n    </task>\n    <servers />\n  </component>\n  <component name=\"TodoView\" selected-index=\"1\">\n    <todo-panel id=\"selected-file\">\n      <is-autoscroll-to-source value=\"true\" />\n    </todo-panel>\n  </component>\n  <component name=\"ToolWindowManager\">\n    <frame x=\"-8\" y=\"-8\" width=\"1936\" height=\"1056\" extended-state=\"6\" />\n    <editor active=\"true\" />\n    <layout>\n      <window_info content_ui=\"combo\" id=\"Project\" order=\"0\" sideWeight=\"0.83653843\" weight=\"0.0116182575\" />\n      <window_info id=\"Structure\" order=\"1\" sideWeight=\"0.16346154\" side_tool=\"true\" weight=\"0.2033762\" />\n      <window_info id=\"Favorites\" order=\"2\" sideWeight=\"0.50073206\" side_tool=\"true\" weight=\"0.19253333\" />\n      <window_info anchor=\"bottom\" id=\"Message\" order=\"0\" />\n      <window_info anchor=\"bottom\" id=\"Find\" order=\"1\" />\n      <window_info anchor=\"bottom\" id=\"Run\" order=\"2\" sideWeight=\"0.8666181\" weight=\"0.32083791\" />\n      <window_info anchor=\"bottom\" id=\"Cvs\" order=\"3\" weight=\"0.25\" />\n      <window_info anchor=\"bottom\" id=\"Inspection\" order=\"4\" weight=\"0.4\" />\n      <window_info anchor=\"bottom\" id=\"TODO\" order=\"5\" sideWeight=\"0.49927112\" weight=\"0.3293124\" />\n      <window_info anchor=\"bottom\" id=\"Python Console\" order=\"6\" sideWeight=\"0.49854228\" weight=\"0.3293124\" />\n      <window_info anchor=\"bottom\" id=\"Terminal\" order=\"7\" weight=\"0.32328105\" />\n      <window_info anchor=\"bottom\" id=\"Version Control\" order=\"8\" weight=\"0.32900432\" />\n      <window_info anchor=\"bottom\" id=\"Floobits\" order=\"9\" weight=\"0.32822758\" />\n      <window_info anchor=\"bottom\" id=\"Debug\" order=\"10\" sideWeight=\"0.83840305\" weight=\"0.20476706\" />\n      <window_info anchor=\"bottom\" id=\"Docker\" order=\"11\" show_stripe_button=\"false\" />\n      <window_info anchor=\"bottom\" id=\"File Transfer\" order=\"12\" weight=\"0.22601984\" />\n      <window_info anchor=\"bottom\" id=\"Database Changes\" order=\"13\" show_stripe_button=\"false\" />\n      <window_info anchor=\"bottom\" id=\"Event Log\" order=\"14\" sideWeight=\"0.16159695\" side_tool=\"true\" weight=\"0.28886437\" />\n      <window_info anchor=\"right\" id=\"Commander\" internal_type=\"SLIDING\" order=\"0\" type=\"SLIDING\" weight=\"0.4\" />\n      <window_info anchor=\"right\" id=\"Ant Build\" order=\"1\" weight=\"0.25\" />\n      <window_info anchor=\"right\" content_ui=\"combo\" id=\"Hierarchy\" order=\"2\" weight=\"0.25\" />\n      <window_info anchor=\"right\" x=\"0\" y=\"0\" width=\"434\" height=\"856\" id=\"Documentation\" order=\"3\" side_tool=\"true\" weight=\"0.3565417\" />\n      <window_info anchor=\"right\" id=\"SciView\" order=\"4\" />\n      <window_info anchor=\"right\" id=\"Database\" order=\"5\" />\n      <window_info anchor=\"right\" id=\"Cargo\" order=\"6\" />\n    </layout>\n  </component>\n  <component name=\"TypeScriptGeneratedFilesManager\">\n    <option name=\"version\" value=\"1\" />\n  </component>\n  <component name=\"VcsContentAnnotationSettings\">\n    <option name=\"myLimit\" value=\"2678400000\" />\n  </component>\n  <component name=\"XDebuggerManager\">\n    <breakpoint-manager>\n      <default-breakpoints>\n        <breakpoint type=\"python-exception\">\n          <properties notifyOnTerminate=\"true\" exception=\"BaseException\">\n            <option name=\"notifyOnTerminate\" value=\"true\" />\n          </properties>\n        </breakpoint>\n      </default-breakpoints>\n    </breakpoint-manager>\n  </component>\n  <component name=\"editorHistoryManager\">\n    <entry file=\"file://$PROJECT_DIR$/venv/Lib/site-packages/yarl/__init__.py\" />\n    <entry file=\"file://$PROJECT_DIR$/test.py\" />\n    <entry file=\"file://$PROJECT_DIR$/../ChocChip/core.py\" />\n    <entry file=\"file://$PROJECT_DIR$/main.py\" />\n    <entry file=\"file://$USER_HOME$/Desktop/cogsss.py\" />\n    <entry file=\"file://$PROJECT_DIR$/frontend.py\" />\n    <entry file=\"file://$USER_HOME$/Desktop/gaer.py\" />\n    <entry file=\"file://$PROJECT_DIR$/image.py\" />\n    <entry file=\"file://D:/PokéFuser/fuser.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"323\">\n          <caret line=\"19\" column=\"32\" selection-start-line=\"19\" selection-start-column=\"32\" selection-end-line=\"19\" selection-end-column=\"32\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/commands_archive.py\" />\n    <entry file=\"file://$USER_HOME$/Desktop/rominfo test/rominfo.py\" />\n    <entry file=\"file://$PROJECT_DIR$/owner.py\" />\n    <entry file=\"file://D:/Yukiko/old_main.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"136\">\n          <caret line=\"8\" selection-start-line=\"8\" selection-end-line=\"8\" selection-end-column=\"23\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/connect4.py\" />\n    <entry file=\"file://$PROJECT_DIR$/venv/Lib/site-packages/discord/ext/commands/bot.py\" />\n    <entry file=\"file://$PROJECT_DIR$/yuki - Copy.py\" />\n    <entry file=\"file://$PROJECT_DIR$/venv/Lib/site-packages/discord/ext/commands/core.py\" />\n    <entry file=\"file://$PROJECT_DIR$/trash/gae.py\" />\n    <entry file=\"file://$PROJECT_DIR$/setup.py\" />\n    <entry file=\"file://$PROJECT_DIR$/venv/Lib/site-packages/discord/embeds.py\" />\n    <entry file=\"file://$PROJECT_DIR$/trash/yuki - Copy.py\" />\n    <entry file=\"file://$PROJECT_DIR$/venv/Lib/site-packages/discord/member.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"194\">\n          <caret line=\"167\" column=\"13\" selection-start-line=\"167\" selection-start-column=\"13\" selection-end-line=\"167\" selection-end-column=\"13\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/minigames.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"1785\">\n          <caret line=\"107\" column=\"13\" selection-start-line=\"107\" selection-start-column=\"13\" selection-end-line=\"107\" selection-end-column=\"13\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/cogs/fun.py\" />\n    <entry file=\"file://$PROJECT_DIR$/cogs/experimental.py\" />\n    <entry file=\"file://$PROJECT_DIR$/cogs/moderation.py\" />\n    <entry file=\"file://$USER_HOME$/AppData/Local/Programs/Python/Python36/Lib/logging/__init__.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"204\">\n          <caret line=\"858\" column=\"11\" lean-forward=\"true\" selection-start-line=\"855\" selection-start-column=\"36\" selection-end-line=\"858\" selection-end-column=\"11\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/cogs/mod.py\" />\n    <entry file=\"file://$USER_HOME$/Desktop/litebot.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"493\">\n          <caret line=\"30\" column=\"26\" selection-start-line=\"30\" selection-start-column=\"26\" selection-end-line=\"30\" selection-end-column=\"26\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/config.ini\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"17\">\n          <caret line=\"1\" column=\"71\" selection-start-line=\"1\" selection-start-column=\"71\" selection-end-line=\"1\" selection-end-column=\"71\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$APPLICATION_CONFIG_DIR$/pycharm64.exe.vmoptions\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"17\">\n          <caret line=\"1\" lean-forward=\"true\" selection-start-line=\"1\" selection-end-line=\"1\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/frontend.pyw\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"1411\">\n          <caret line=\"93\" column=\"32\" selection-start-line=\"93\" selection-start-column=\"32\" selection-end-line=\"93\" selection-end-column=\"32\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/trash/commands_archive.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"323\">\n          <caret line=\"753\" column=\"17\" selection-start-line=\"753\" selection-start-column=\"17\" selection-end-line=\"753\" selection-end-column=\"17\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/cogs/copypasta.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"527\">\n          <caret line=\"33\" selection-start-line=\"33\" selection-end-line=\"33\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/cogs/image.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"407\">\n          <caret line=\"302\" selection-start-line=\"302\" selection-end-line=\"302\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/cogs/text.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"153\">\n          <caret line=\"19\" column=\"43\" selection-start-line=\"19\" selection-start-column=\"43\" selection-end-line=\"19\" selection-end-column=\"43\" />\n          <folding>\n            <element signature=\"e#0#14#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/cogs/nsfw.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"714\">\n          <caret line=\"51\" selection-start-line=\"51\" selection-end-line=\"51\" />\n          <folding>\n            <element signature=\"e#0#14#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/cogs/coins.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"68\">\n          <caret line=\"9\" column=\"57\" selection-start-line=\"9\" selection-start-column=\"57\" selection-end-line=\"9\" selection-end-column=\"57\" />\n          <folding>\n            <element signature=\"e#0#14#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/cogs/utils.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"5134\">\n          <caret line=\"312\" column=\"11\" selection-start-line=\"312\" selection-start-column=\"11\" selection-end-line=\"312\" selection-end-column=\"11\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/cogs/stars.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"833\">\n          <caret line=\"55\" column=\"38\" selection-start-line=\"55\" selection-start-column=\"38\" selection-end-line=\"55\" selection-end-column=\"38\" />\n          <folding>\n            <element signature=\"e#0#14#0\" expanded=\"true\" />\n            <marker date=\"1538235998449\" expanded=\"true\" signature=\"692:698\" ph=\"...\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/cogs/info.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"1241\">\n          <caret line=\"81\" column=\"26\" selection-start-line=\"81\" selection-start-column=\"26\" selection-end-line=\"81\" selection-end-column=\"33\" />\n          <folding>\n            <element signature=\"e#0#14#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/cogs/owner.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"1768\">\n          <caret line=\"120\" column=\"12\" selection-start-line=\"120\" selection-start-column=\"12\" selection-end-line=\"120\" selection-end-column=\"12\" />\n          <folding>\n            <element signature=\"e#0#14#0\" expanded=\"true\" />\n            <marker date=\"1538265090602\" expanded=\"true\" signature=\"707:713\" ph=\"...\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/cogs/tests.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"782\">\n          <caret line=\"49\" column=\"82\" selection-start-line=\"49\" selection-start-column=\"82\" selection-end-line=\"49\" selection-end-column=\"82\" />\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/yuki.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"-964\">\n          <caret line=\"92\" column=\"56\" selection-start-line=\"92\" selection-start-column=\"56\" selection-end-line=\"92\" selection-end-column=\"56\" />\n          <folding>\n            <element signature=\"e#0#14#0\" expanded=\"true\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n    <entry file=\"file://$PROJECT_DIR$/cogs/guild.py\">\n      <provider selected=\"true\" editor-type-id=\"text-editor\">\n        <state relative-caret-position=\"617\">\n          <caret line=\"169\" column=\"53\" selection-start-line=\"169\" selection-start-column=\"53\" selection-end-line=\"169\" selection-end-column=\"53\" />\n          <folding>\n            <element signature=\"e#0#14#0\" expanded=\"true\" />\n            <marker date=\"1538856021276\" expanded=\"true\" signature=\"4617:4622\" ph=\"...\" />\n          </folding>\n        </state>\n      </provider>\n    </entry>\n  </component>\n</project>"
  },
  {
    "path": "LICENSE",
    "content": "GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>."
  },
  {
    "path": "README.md",
    "content": "# YukikoBot\n[![Discord Bots](https://discordbots.org/api/widget/447493600167591936.svg)](https://discordbots.org/bot/447493600167591936)\n\n[![Discord Bot List](https://discordbotlist.com/bots/447493600167591936/widget)](https://discordbotlist.com/bots/447493600167591936)\n"
  },
  {
    "path": "assets/dice/hd/resize.py",
    "content": "from os import listdir\nfrom os.path import isfile, join\nfrom PIL import Image\n\na = [f for f in listdir(\"./\") if isfile(join(\"./\", f))]\na.remove(\"resize.py\")\n\nfor file in a:\n    img = Image.open(file)\n    img.thumbnail([128,128], Image.ANTIALIAS)\n    img.save(file)\n"
  },
  {
    "path": "assets/sounds/README.md",
    "content": "## Credits\n[YouTube SFX Pack](https://www.youtube.com/watch?v=B-uIfFgMPyw)"
  },
  {
    "path": "assets/sounds/lowercase.py",
    "content": "import os\n\ndef lowercase_rename(dir):\n    # renames all subforders of dir, not including dir itself\n    def rename_all(root, items):\n        for name in items:\n            try:\n                os.rename(\n                    os.path.join(root, name), \n                    os.path.join(root, name.lower())\n                )\n            except OSError:\n                pass # can't rename it, so what\n\n    # starts from the bottom so paths further up remain valid after renaming\n    for root, dirs, files in os.walk(dir, topdown = False):\n        rename_all(root, dirs)\n        rename_all(root, files)\n\nif __name__ == '__main__':\n    lowercase_rename(\"./\")\n"
  },
  {
    "path": "cogs/coins.py",
    "content": "import discord\nfrom discord.ext import commands\nfrom yuki import color as ykColor\n\nimport logging\nimport dataset\n\n# class to make a database table like a key-value store\nclass KeyValueTable:\n    \"\"\"operate a database table like a key-value store\"\"\"\n\n    # initiate the KeyValueDB\n    def __init__(self, table):\n        \"\"\"\ninitiate the KeyValueDB\n:param table: a dataset table\n\"\"\"\n        self.table = table\n\n    # retrieve a key-value pair from the database\n    def __getitem__(self, key):\n        \"\"\"\nretrieve an item from the key-value store\n:param key: the name of the requested item\n:return: the requested item\n:raises KeyError: it raises KeyError if it cannot be found\n\"\"\"\n        # attempt to find the requested item\n        res = self.table.find_one(key=key)[\"value\"]\n        # check if it returned something\n        if not res:\n            # raise IndexError if it cannot be found\n            raise KeyError(f\"unable to find key-value pair with key { key }\")\n        else:\n            # otherwise return the requested item\n            return res\n\n    # set a key-value pair in the database\n    def __setitem__(self, key, value):\n        \"\"\"\nset an item in the key-value store\n:param key: the key to set\n:param value: the value for the key to have\n\"\"\"\n        # upsert it (insert if it doesn't exist, update it if it does)\n        self.table.upsert(dict(key=key, value=value), [\"key\"])\n\n    # delete a key-value pair in the database\n    def __delitem__(self, key):\n        \"\"\"\ndelete a value in the key-value store if it exists\n:param key: the key to delete\n\"\"\"\n        # attempt to delete it\n        self.table.delete(key=key)\n\n    # when the key is missing\n    def __missing__(self, key):\n        # just return none\n        return None\n\nclass Coins:\n    def __init__(self, bot):\n        self.bot = bot\n\n    @commands.command(hidden = True)\n    @commands.is_owner()\n    async def cointest(self, ctx, member: discord.Member = None):\n        if member == None:\n            mem = ctx.message.author\n        else:\n            mem = member\n\n        database = dataset.connect(\"sqlite:///yukiko.db\")\n        table = KeyValueTable(database[\"coins\"])\n        try:\n            table[mem.id][\"amount\"] += 500\n        except:\n            table[mem.id] = {\"amount\": 0, \"minutesLeft\": 60}\n\n        await ctx.send(table[mem.id][\"amount\"])\n\ndef setup(bot):\n    bot.add_cog(Coins(bot))"
  },
  {
    "path": "cogs/copypasta.py",
    "content": "import discord\nfrom discord.ext import commands\nfrom yuki import color as ykColor\n\nclass Copypasta:\n    def __init__(self, bot):\n        self.bot = bot\n\n    @commands.command(aliases = [\"interject\", u\"\\U0001f427\"])\n    async def linux(self, ctx, a: commands.clean_content = \"GNU\", b: commands.clean_content = \"Linux\"):\n        \"\"\"Interjects for a moment, about your favorite thing.\"\"\"\n\n        message = f\"\"\"\nI'd just like to interject for moment. What you're refering to as {b}, is in fact, \n{a}/{b}, or as I've recently taken to calling it, {a} plus {b}. {b} is not an \noperating system unto itself, but rather another free component of a fully \nfunctioning {a} system made useful by the {a} corelibs, shell utilities and vital \nsystem components comprising a full OS as defined by POSIX.\n\nMany computer users run a modified version of the {a} system every day, \nwithout realizing it. Through a peculiar turn of events, the version of {a} which \nis widely used today is often called {b}, and many of its users are not aware \nthat it is basically the {a} system, developed by the {a} Project.\n\nThere really is a {b}, and these people are using it, but it is just a part of the \nsystem they use. {b} is the kernel: the program in the system that allocates the \nmachine's resources to the other programs that you run. The kernel is an \nessential part of an operating system, but useless by itself; it can only function \nin the context of a complete operating system. {b} is normally used in \ncombination with the {a} operating system: the whole system is basically {a} \nwith {b} added, or {a}/{b}. All the so-called {b} distributions are really \ndistributions of {a}/{b}.\n        \"\"\"\n\n        await ctx.send(message)\n\n    @commands.command(aliases = [\"cemu\"])\n    async def botw(self, ctx, a: commands.clean_content = \"Breath of the Dicknut\"):\n        \"\"\"Rants about Breath of the Dicknut.\"\"\"\n\n        message = f\"\"\"\nAre you retarded? Like legit retarded? You keep breaking more and more games, for \nfucking {a}. Many games before, were fully playable with some \nminor glitches, then you started breaking them more and more with ear rape sound, \nslow fps, visual glitches, and then eventually just not booting up. Oh I'm sorry, \nyou seem to be focusing on ONLINE and System Menu shit too. You're not very bright \nas a developer if you're okay with making huge regressions quite a number of other \ngames just to focus on 1 or 2. You don't BREAK 20+ working games just for 2. That's \njust retarded. Also whether you like it or not, Vulckan would improve performance \na lot, just because you don't THINK it will or you just lack the skill to implement \nit doesn't matter, it's better than OpenGL. Now, just to make sure your small mind \nunderstands... STOP BREAKING OTHER GAMES FOR {a.upper()}, STOP FOCUSING \nON ONLINE PLAY AND SYSTEM MENUS, AND FIX THE SHIT YOU'VE BROKEN! DON'T WORK ON NEW \nFEATURES UNTIL YOU GET OTHER THINGS WORKING IN THE FIRST PLACE, HOLY FUCKING SHIT! \nAND MAYBE TAKE THE TIME YOU NEED TO IMPLEMENT VULKAN! IF YOU CAN'T DO THAT THEN MAKE \nIT OPEN SOURCE AND WE WILL, BUT WAIT, YOU NEED THOSE FUNDS FOR {a.upper()} \nRIGHT? LOL Point is your decisions and lack of skills suck as a Dev and people are \nsick of the \"{a} Emulator\", fucking focus on something else, Jesus Christ.\n        \"\"\"\n\n        await ctx.send(message)\n\ndef setup(bot):\n    bot.add_cog(Copypasta(bot))"
  },
  {
    "path": "cogs/guild.py",
    "content": "import discord\nfrom discord.ext import commands\nfrom yuki import color as ykColor\nimport yuki\n\nimport logging\n\nclass Guild:\n    def __init__(self, bot):\n        self.bot = bot\n    \n    @commands.command(aliases = [\"prune\"])\n    @commands.has_permissions(manage_messages = True)\n    async def purge(self, ctx, amount: int = 1):\n        \"\"\"Purge the amount of messages you specify. The purge limit is 50 by default.\"\"\"\n\n        purgeLimit = 50\n        if amount > purgeLimit:\n            # await ctx.send(f\"Can't purge more than {purgeLimit} messages at a time. <:cross_mark:465215264439664650>\")\n            await ctx.message.add_reaction(yuki.cross_mark)\n\n            return 0\n        else:\n            msg1 = ctx.message\n\n            await ctx.message.delete()\n            await msg1.channel.purge(limit = amount)\n            logging.info(f\"Deleted {amount} messages in #{msg1.channel} from guild: {msg1.guild} with ID {msg1.guild.id}.\")\n\n    @commands.command()\n    @commands.has_permissions(kick_members = True)\n    async def kick(self, ctx, *members: discord.Member):\n        \"\"\"Kicks member(s). Requires kick permission.\"\"\"\n\n        if len(members) == 0:\n            await yuki.send_error(\"No members were passed.\", ctx)\n            return\n\n        output = \"\"\n        for mem in members:\n            if mem.id == self.bot.user.id:\n                output += u\"\\U000026d4 **{}:**\\n{}\\n\\n\".format(mem, f\"Can't kick self.\")\n                continue\n\n            if ctx.guild.owner != mem:\n                try:\n                    await mem.kick(reason = f\"{ctx.author} used the kick command.\")\n                    output += u\"\\U00002705 **{}:**\\n{}\\n\\n\".format(mem, f\"Successfully kicked.\")\n                except:\n                    output += u\"\\U000026a0 **{}:**\\n{}\\n\\n\".format(mem, f\"Couldn't kick.\")\n            else:\n                output += u\"\\U000026d4 **{}:**\\n{}\\n\\n\".format(mem, f\"Server owner, can't be kicked.\")\n\n        embed = discord.Embed(title = \"Attempted to Kick\", description = output, color = ykColor)\n        await ctx.send(embed = embed)\n\n    @commands.command()\n    @commands.has_permissions(ban_members = True)\n    async def ban(self, ctx, *members: discord.Member):\n        \"\"\"Bans member(s). Requires ban permission.\"\"\"\n\n        if len(members) == 0:\n            await yuki.send_error(\"No members were passed.\", ctx)\n            return\n\n        output = \"\"\n        for mem in members:\n            if mem.id == self.bot.user.id:\n                output += u\"\\U000026d4 **{}:**\\n{}\\n*ID: {}*\\n\\n\".format(mem, f\"Can't ban self.\", mem.id)\n                continue\n\n            if ctx.guild.owner != mem:\n                try:\n                    await mem.ban(reason = f\"{ctx.author} used the ban command.\")\n                    output += u\"\\U00002705 **{}:**\\n{}\\n*ID: {}*\\n\\n\".format(mem, f\"Successfully banned.\", mem.id)\n                except:\n                    output += \"<:cross_mark:465215264439664650> **{}:**\\n{}\\n*ID: {}*\\n\\n\".format(mem, f\"Couldn't ban.\", mem.id)\n            else:\n                output += u\"\\U000026d4 **{}:**\\n{}\\n*ID: {}*\\n\\n\".format(mem, f\"Server owner, can't be banned.\", mem.id)\n\n        embed = discord.Embed(title = \"Attempted to Ban\", description = output, color = ykColor)\n        await ctx.send(embed = embed)\n\n    @commands.command(aliases = [\"nickname\", \"changenick\", \"changenickname\"])\n    @commands.has_permissions(manage_nicknames = True)\n    async def nick(self, ctx, member: discord.Member, nickname: str = None):\n        \"\"\"Changes other member's nickname.\"\"\"\n\n        \"\"\"if member == None:\n            if ctx.message.author.permissions_in(ctx.message.channel).change_nickname:\n                mem = ctx.message.author\n        else:\n            mem = member\n        \"\"\"\n        mem = member\n        oldName = mem.display_name\n\n        if ctx.guild.owner == mem:\n            await yuki.send_error(\"Can't change nick of the server owner.\", ctx)\n        else:\n            try:\n                await mem.edit(nick = nickname, reason = f\"{ctx.author} used the nick command.\")\n                embed = discord.Embed(description = \"\", color = ykColor)\n                embed.set_author(\n                    name = f\"Successfully changed nickname of {mem}, from {oldName} to {nickname}.\",\n                    icon_url = \"https://cdn.discordapp.com/attachments/447500690932367361/476214759071678474/nickname_icon.png\"\n                )\n                await ctx.send(embed = embed)\n            except:\n                await yuki.send_error(f\"Couldn't change nickname of {mem}.\", ctx)\n\n    @commands.group()\n    async def create(self, ctx):\n        pass\n\n    @create.command(aliases = [\"chan\", \"cha\"])\n    @commands.has_permissions(manage_channels = True)\n    async def channel(self, ctx, *name: str):\n        \"\"\"Creates a channel.\"\"\"\n\n        gld = ctx.guild\n        name = '-'.join(name).lower()\n        try:\n            await gld.create_text_channel(name = name, reason = f\"{ctx.author} used the create channel command.\")\n\n            embed = discord.Embed(description = \"\", color = ykColor)\n            embed.set_author(\n                name = f\"Successfully created channel #{name}.\",\n                icon_url = \"https://cdn.discordapp.com/attachments/447786789563006986/476225004015452160/plus_icon.png\"\n            )\n            await ctx.send(embed = embed)\n        except:\n            if len(gld.channels) <= 500:\n                await yuki.send_error(f\"No space left to create #{name}.\", ctx)\n            else:\n                await yuki.send_error(f\"Couldn't create channel #{name}.\", ctx)\n\n    @create.command(aliases = [\"emo\"])\n    @commands.has_permissions(manage_emojis = True)\n    async def emoji(self, ctx, name: str, link: str = None):\n        \"\"\"Creates an emoji.\"\"\"\n\n        if len(ctx.guild.emojis) >= 50:\n            await yuki.send_error(\"No space left to create emoji.\", ctx)\n        else:\n            img_bytes = await yuki.get_image(link, ctx)\n            try:\n                emo = await ctx.guild.create_custom_emoji(\n                    name = '_'.join(name.split()),\n                    image = img_bytes,\n                    reason = f\"{ctx.author} used the create emoji command.\"\n                )\n\n                embed = discord.Embed(description = f\"Successfully created emoji {emo}.\", color = ykColor)\n                await ctx.send(embed = embed)\n            except:\n                await yuki.send_error(\"Couldn't create emoji.\", ctx)\n\n    @commands.command(aliases = [\"slowmode\", \"slow\", u\"\\U0001f40c\"])\n    @commands.has_permissions(manage_channels = True)\n    async def setslow(self, ctx, secs: int = 0):\n        \"\"\"Sets the slowmode delay of the channel you're in.\"\"\"\n\n        if secs > 120:\n            await yuki.send_error(\"The delay can't be longer than 120 seconds!\", ctx)\n        else:\n            cha = ctx.channel\n\n            try:\n                await cha.edit(slowmode_delay = secs)\n                if secs != 0:\n                    await yuki.send_error(f\"Successfully set slowmode delay to {secs}.\", ctx, icon = u\"\\U00002705\")\n                else:\n                    await yuki.send_error(f\"Successfully reset the slowmode delay.\", ctx, icon = u\"\\U00002705\")\n            except:\n                await yuki.send_error(f\"Couldn't set slowmode delay for channel {cha.mention}.\", ctx)\n\ndef setup(bot):\n    bot.add_cog(Guild(bot))"
  },
  {
    "path": "cogs/image.py",
    "content": "import discord\nfrom discord.ext import commands\nfrom yuki import color as ykColor\n\nimport yuki\n\nimport aiohttp\nfrom PIL import Image, ImageFont, ImageDraw, ImageFilter, ImageEnhance\nimport PIL.ImageOps\nfrom io import BytesIO\n# import tinify\nimport qrcode\nimport random\nimport codecs\nfrom bs4 import BeautifulSoup\nimport urllib.request\n\nfrom os import listdir\n\nclass Images:\n    def __init__(self, bot):\n        self.bot = bot\n\n    @commands.command()\n    async def flip(self, ctx, xy: str, link: str = None):\n        \"\"\"Flips image horizontally, or vertically.\"\"\"\n\n        # messages = await ctx.message.channel.history().flatten()\n\n        async with ctx.typing():\n            img_bytes = await yuki.get_image(link, ctx)\n            with Image.open(BytesIO(img_bytes)) as img:\n                if xy.lower() in ('x', 'h', 'horizontal', 'horizontally'):\n                    img = img.transpose(Image.FLIP_LEFT_RIGHT)\n                    flipped = 'X'\n                elif xy.lower() in ('y', 'v', \"vertical\", \"vertically\"):\n                    img = img.transpose(Image.FLIP_TOP_BOTTOM)\n                    flipped = 'Y'\n                else:\n                    img = img.transpose(Image.FLIP_LEFT_RIGHT)\n                    flipped = 'X'\n\n                output_buf = BytesIO()\n                img.save(output_buf, \"png\")\n                output_buf.seek(0)\n\n            file = discord.File(filename = \"result.png\", fp = output_buf)\n\n            embed = discord.Embed(title = f\"Flipped {flipped}\", color = ykColor)\n            file = discord.File(filename = \"result.png\", fp = output_buf)\n            embed.set_image(url = \"attachment://result.png\")\n\n            await ctx.send(embed = embed, file = file)\n\n    @commands.command(aliases = [\"pokefuse\"])\n    async def pfuse(self, ctx, body: int, head: int):\n        \"\"\"\n        Fuses two Pokémon together.\n        This command uses [this website](https://pokemon.alexonsager.net/) to output fused Pokémon.\n        \"\"\"\n\n        if False:\n            await yuki.send_error(\"Only Kanto Pokémon are supported.\", ctx)\n            return\n\n        async with ctx.typing():\n            fusion_link = f\"http://images.alexonsager.net/pokemon/fused/{body}/{body}.{head}.png\"\n            async with aiohttp.ClientSession() as session:\n                async with session.get(fusion_link) as response:\n                    img_bytes = await response.read()\n\n            embed = discord.Embed(title = \"Pokémon Fusion\", color = ykColor)\n            file = discord.File(filename = \"result.png\", fp = BytesIO(img_bytes))\n            embed.set_image(url = \"attachment://result.png\")\n\n            await ctx.send(embed = embed, file = file)\n\n    @commands.command()\n    async def clyde(self, ctx, *, text: str = None):\n        \"\"\"Gives you an image that mocks clyde.\"\"\"\n\n        if text == None:\n            txt = \"This emoji doesn't work here because it's from a different server. Discord Nitro can solve all of that, check User Settings > Nitro for details\"\n        else:\n            txt = text.replace('\\n', ' ')\n\n        async with ctx.typing():\n            img = Image.open(\"assets/clyde.png\")\n            font = ImageFont.truetype(\"assets/fonts/discord/normal.woff\", 15)\n            draw = ImageDraw.Draw(img)\n            draw.text((88, 46), txt, font = font, fill = (192, 193, 194))\n\n            output_buf = BytesIO()\n            img.save(output_buf, \"png\")\n            output_buf.seek(0)\n\n            file = discord.File(filename = \"result.png\", fp = output_buf)\n\n            await ctx.send(file = file)\n\n    @commands.command(aliases = [u\"\\U0001f914\"])\n    async def thonk(self, ctx, link: str = None):\n        \"\"\"Thonkifies the image you provide.\"\"\"\n\n        async with ctx.typing():\n            img_bytes = await yuki.get_image(link, ctx)\n            with Image.open(BytesIO(img_bytes)) as img:\n                imgThonk = Image.open(\"assets/thonk.png\")\n                imgThonk = imgThonk.resize(img.size, Image.ANTIALIAS)\n                img.paste(imgThonk, (0, 0), imgThonk)\n\n                output_buf = BytesIO()\n                # img.save(output_buf, \"png\", optimize = True, quality = 95)\n                img.save(output_buf, \"png\")\n                output_buf.seek(0)\n\n            a = random.choice((\"think\", \"thonk\", \"thenk\", \"thank\", \"thunk\", \"thuck\"))\n            b = random.choice((\"ing\", \"eng\", \"eeng\", \"ang\"))\n            c = random.choice(\n                (\n                    \"<:thunking:438870072870830100> \",\n                    \"<:thuck:457358934127149056>\",\n                    \"<:thonkDIY:457359669673852958>\",\n                    \"<:thonk:457359658357620746>\",\n                    \"<:thenkeng:416429946538295298>\",\n                    \"<:thanking:416429946441957377>\",\n                    \"<:hmm:438870239158075407>\",\n                    \"<:hmm:457359215070019585>\",\n                    \"<:blobthonkang:416430096291987467>\"\n                )\n            )\n\n            embed = discord.Embed(title = f\"{a}{b} {c}\", color = 0xFFCC4D)\n            file = discord.File(filename = \"result.png\", fp = output_buf)\n            embed.set_image(url = \"attachment://result.png\")\n\n            await ctx.send(embed = embed, file = file)\n\n    @commands.command(aliases = [u\"\\U0001f4ad\"])\n    async def thought(self, ctx, link: str = None):\n        \"\"\"Thoughts about the image you provide.\"\"\"\n        # TODO: Blocks a huge amount, fix it.\n\n        async with ctx.typing():\n            img_bytes = await yuki.get_image(link, ctx)\n            with Image.open(BytesIO(img_bytes)) as img:\n                layer1 = Image.open(\"assets/thonk3.png\")\n                layer1 = layer1.resize((int(img.width * 2.5), int(img.width * 2.5)), Image.ANTIALIAS)\n\n                layer3 = Image.new(\"RGBA\", (int(img.width * 2.5), int(img.width * 2.5)), (0, 0, 0, 0))\n                layer3.paste(img, (0, 0), img.convert(\"RGBA\"))\n\n                layer2 = Image.open(\"assets/thonk2.png\")\n                layer2 = layer2.resize((int(img.width * 1.75), int(img.width * 1.75)), Image.ANTIALIAS)\n                layer2_canvas = Image.new(\"RGBA\", (int(img.width * 2.5), int(img.width * 2.5)), (0, 0, 0, 0))\n                layer2_canvas.paste(layer2, (int((img.width * 2.5) - layer2.width), int((img.width * 2.5) - layer2.height)), layer2)\n                layer2 = layer2_canvas\n                # layer2.paste(layer3, (0, 0), layer3)\n                layer2 = Image.alpha_composite(layer2, layer3)\n\n                # layer1.paste(layer2, (0, 0), layer2)\n                layer1 = Image.alpha_composite(layer1, layer2)\n                result = layer1\n\n                output_buf = BytesIO()\n                result.save(output_buf, \"png\")\n                output_buf.seek(0)\n\n            file = discord.File(filename = \"result.png\", fp = output_buf)\n\n            await ctx.send(file = file)\n\n    @commands.group(aliases = [\"f\", u\"\\U0001f578\"])\n    async def filter(self, ctx):\n        pass\n\n    @filter.command()\n    async def invert(self, ctx, link: str = None):\n        \"\"\"Inverts image.\"\"\"\n\n        # messages = await ctx.message.channel.history().flatten()\n\n        async with ctx.typing():\n            img_bytes = await yuki.get_image(link, ctx)\n            with Image.open(BytesIO(img_bytes)) as img:\n                if img.mode == \"RGBA\":\n                    r, g, b, a = img.split()\n                    img_rgb = Image.merge(\"RGB\", (r, g, b))\n                    img_inv = PIL.ImageOps.invert(img_rgb)\n                    r2, g2, b2 = img_inv.split()\n                    img = Image.merge(\"RGBA\", (r2, g2, b2, a))\n                else:\n                    img = PIL.ImageOps.invert(img)\n\n                output_buf = BytesIO()\n                img.save(output_buf, \"png\")\n                output_buf.seek(0)\n\n            file = discord.File(filename = \"result.png\", fp = output_buf)\n\n            await ctx.send(file = file)\n\n    @filter.command(aliases = [u\"\\u0001f4a7\"])\n    async def blur(self, ctx, radius: int = 2, link: str = None):\n        \"\"\"Blurs image.\"\"\"\n\n        if radius > 100:\n            await yuki.send_error(\"Radius is limited to 100.\", ctx)\n        else:\n            async with ctx.typing():\n                img_bytes = await yuki.get_image(link, ctx)\n                with Image.open(BytesIO(img_bytes)) as img:\n                    img = img.filter(ImageFilter.GaussianBlur(radius = radius))\n\n                    output_buf = BytesIO()\n                    img.save(output_buf, \"png\")\n                    output_buf.seek(0)\n\n                embed = discord.Embed(color = 0x36393F)\n                file = discord.File(filename = \"result.png\", fp = output_buf)\n                embed.set_image(url = \"attachment://result.png\")\n                embed.set_footer(text = f\"Radius: {radius}\")\n\n                await ctx.send(embed = embed, file = file)\n\n    @filter.command()\n    async def emboss(self, ctx, link: str = None):\n        \"\"\"Applies emboss filter to image.\"\"\"\n\n        async with ctx.typing():\n            img_bytes = await yuki.get_image(link, ctx)\n            with Image.open(BytesIO(img_bytes)) as img:\n                img = img.filter(ImageFilter.EMBOSS)\n\n                output_buf = BytesIO()\n                img.save(output_buf, \"png\")\n                output_buf.seek(0)\n\n            file = discord.File(filename = \"result.png\", fp = output_buf)\n\n            await ctx.send(file = file)\n\n    @filter.command()\n    async def contour(self, ctx, link: str = None):\n        \"\"\"Applies contour filter to image.\"\"\"\n\n        async with ctx.typing():\n            img_bytes = await yuki.get_image(link, ctx)\n            with Image.open(BytesIO(img_bytes)) as img:\n                img = img.filter(ImageFilter.CONTOUR)\n\n                output_buf = BytesIO()\n                img.save(output_buf, \"png\")\n                output_buf.seek(0)\n\n            file = discord.File(filename = \"result.png\", fp = output_buf)\n\n            await ctx.send(file = file)\n\n    @filter.command()\n    async def mosaic(self, ctx, link: str = None):\n        \"\"\"Applies mosaic filter to image.\"\"\"\n\n        async with ctx.typing():\n            img_bytes = await yuki.get_image(link, ctx)\n            with Image.open(BytesIO(img_bytes)) as img:\n                output = Image.new(\"RGBA\", img.size, color = (0, 0, 0, 0))\n                quarter_img = img.resize((int(img.width / 2), int(img.height / 2)), resample = Image.BICUBIC)\n                locations = (\n                    (0, 0),\n                    (int(img.width / 2), 0),\n                    (0, int(img.height / 2)),\n                    (int(img.width / 2), int(img.height / 2))\n                )\n\n                for location in locations:\n                    output.paste(quarter_img, location)\n\n                output_buf = BytesIO()\n                output.save(output_buf, \"png\")\n                output_buf.seek(0)\n\n            file = discord.File(filename = \"result.png\", fp = output_buf)\n\n            await ctx.send(file = file)\n\n    @commands.command(aliases = [\"qr\", u\"\\U0001f4d3\"])\n    async def qrcode(self, ctx, *, text: str = None):\n        \"\"\"Gives you a QR Code that includes text.\"\"\"\n\n        async with ctx.typing():\n            qr = qrcode.QRCode(\n                box_size = 20\n            )\n\n            qr.add_data(text)\n            qr.make()\n            img = qr.make_image(fill_color = \"black\", back_color = \"white\")\n\n            output_buf = BytesIO()\n            img.save(output_buf, \"png\")\n            output_buf.seek(0)\n\n            embed = discord.Embed(title = \"Scan it!\", color = 0xFFFFFF)\n            file = discord.File(filename = \"result.png\", fp = output_buf)\n            embed.set_image(url = \"attachment://result.png\")\n\n            await ctx.send(embed = embed, file = file)\n\n    @commands.command(aliases = [u\"\\U0001f47e\"])\n    async def rashot(self, ctx):\n        \"\"\"Gives you a random RetroArch screenshot.\"\"\"\n\n        async with ctx.typing():\n            ss_path = \"D:/RetroArch/screenshots/\"\n            img_path = random.choice(listdir(ss_path))\n\n            file = discord.File(f\"{ss_path}/{img_path}\", filename = \"image.png\")\n            embed = discord.Embed(title = \"RetroArch Screenshot\", url = \"http://retroarch.com/\", color = 0x2196f3)\n            embed.set_image(url = \"attachment://image.png\")\n            embed.set_thumbnail(url = \"https://image.ibb.co/kayTNd/invader.png\")\n\n            await ctx.send(embed = embed, file = file)\n\ndef setup(bot):\n    bot.add_cog(Images(bot))"
  },
  {
    "path": "cogs/info.py",
    "content": "import discord\nfrom discord.ext import commands\nfrom yuki import color as ykColor\nimport yuki\n\nimport aiohttp\nfrom io import BytesIO\n\nfrom os.path import isfile\n\nclass Info:\n    def __init__(self, bot):\n        self.bot = bot\n\n    async def get_check(self, is_true):\n        if is_true:\n            is_true = u\"\\u2705\"\n        else:\n            is_true = str(yuki.cross_mark) # u\"\\u274C\"\n        return is_true\n\n    async def format_time(self, datetime):\n        months = (\n            \"Jan\", \"Feb\",\n            \"Mar\", \"Apr\",\n            \"May\", \"Jun\",\n            \"Jul\", \"Aug\",\n            \"Sep\", \"Oct\",\n            \"Nov\", \"Dec\"\n        )\n\n        return \"{:02} {} {} at {:02}:{:02} and {}s\".format(\n            datetime.day,\n            months[datetime.month - 1],\n            datetime.year,\n            datetime.hour,\n            datetime.minute,\n            datetime.second\n        )\n\n    @commands.command(aliases = [u\"\\U00002753\"])\n    async def help(self, ctx, command = None):\n        \"\"\"Shows the help.\"\"\"\n\n        cog_display_dict = {\n            \"Coins\":        \"\\N{MONEY BAG} Coins\",\n            \"Copypasta\":    \"\\N{SPAGHETTI} Copypasta\",\n            \"Experimental\": \"\\N{CONSTRUCTION SIGN} Experimental\",\n            \"Images\":       \"\\N{FRAME WITH PICTURE} Image\",\n            \"Info\":         \"\\N{INFORMATION SOURCE} Info\",\n            \"Guild\":        \"\\N{HOUSE WITH GARDEN} Server\",\n            \"Text\":         \"\\N{KEYBOARD} Text\",\n            \"Utilities\":    \"\\N{HAMMER AND WRENCH} Utils\",\n            \"NSFW\":         \"\\N{AUBERGINE} NSFW\",\n            \"Stars\":        \"\\N{WHITE MEDIUM STAR} Stars\"\n        }\n\n        prefix = self.bot.command_prefix(self.bot, ctx)[-1]\n\n        if not command:\n            embed = discord.Embed(title = None, description = f\"__{self.bot.description}__\", color = ykColor)\n            embed.set_author(name = self.bot.user.name, icon_url = self.bot.user.avatar_url)\n            embed.set_thumbnail(url = self.bot.user.avatar_url)\n\n            for cog_name in sorted(self.bot.cogs):\n                # Hide the NSFW category in non-NSFW channels.\n                if ctx.guild:\n                    if cog_name == \"NSFW\" and not ctx.channel.nsfw:\n                        continue\n\n                \"\"\"\n                cmds = \"\"\n                for cmd in self.bot.get_cog_commands(cogName):\n                    # lastAlias = \"\" if len(command.aliases) == 0 else '|' + command.aliases[-1]\n                    if not cmd.hidden:\n                        cmds += f\"``{prefix}{cmd.name}`` \"\n                \"\"\"\n                cmds = []\n                for cmd in self.bot.get_cog_commands(cog_name):\n                    if not cmd.hidden:\n                        cmds.append(cmd)\n                cmds = u\" \\u25CF \".join([f\"{cmd}\" for cmd in cmds])\n\n                if cmds != \"\":\n                    embed.add_field(name = cog_display_dict.get(cog_name, cog_name), value = cmds, inline = False)\n\n            embed.set_footer(text = f\"Type {prefix}help <command> for info on a command.\")\n\n            await ctx.send(embed = embed)\n        else:\n            cmd = self.bot.all_commands[command.lower()]\n\n            if not isinstance(cmd, commands.Group):\n                embed = discord.Embed(\n                    title = \"{}{}\".format(prefix, cmd.signature.replace('[', '<').replace(']', '>')),\n                    description = cmd.help,\n                    color = ykColor\n                )\n                embed.set_footer(text = cog_display_dict.get(cmd.cog_name, cmd.cog_name))\n\n                path = f\"assets/usage/{cmd.name}.png\"\n                filename = f\"{cmd.name}.png\"\n                if isfile(path):\n                    file = discord.File(path, filename = filename)\n                    embed.set_image(url = f\"attachment://{filename}\")\n\n                    await ctx.send(embed = embed, file = file)\n                else:\n                    await ctx.send(embed = embed)\n            else:\n                embed = discord.Embed(title = f\"{prefix}{cmd.name}\", description = cmd.help, color = ykColor)\n\n                for command in cmd.commands:\n                    if not command.hidden:\n                        embed.add_field(\n                            name = command.signature.split(' ', 1)[1].replace('[', '<').replace(']', '>'),\n                            value = command.help if command.help else \"No help info.\",\n                            inline = False\n                        )\n                        embed.set_footer(text = cog_display_dict.get(cmd.cog_name, cmd.cog_name))\n\n                await ctx.send(embed = embed)\n\n    @commands.command(aliases = [\"support\"])\n    async def about(self, ctx):\n        \"\"\"Outputs info about the bot.\"\"\"\n\n        \"\"\"await ctx.send(\n              \"```\"\n            + self.bot.description\n            + \"\\nhyarsan is not held responsible for ANYTHING you do with the bot.\"\n            + \"```\"\n            + \"\\nInvite: <https://discordapp.com/oauth2/authorize?client_id=447493600167591936&permissions=8&scope=bot>\\nPermanent Invite Link For Support: https://discord.gg/qfYekaJ\"\n        )\"\"\"\n\n        embed = discord.Embed(\n            title = \"About Yukiko\",\n            description = self.bot.description,\n            color = ykColor\n        )\n        embed.set_author(\n            name = \"Yukiko\",\n            url = \"https://discordbots.org/bot/447493600167591936\",\n            icon_url = self.bot.user.avatar_url\n        )\n        embed.add_field(\n            name = \"Bot Invite:\",\n            value = \"[Link](https://discordapp.com/oauth2/authorize?client_id=447493600167591936&permissions=8&scope=bot)\",\n            inline = True\n        )\n        embed.add_field(\n            name = \"Support Server Invite:\",\n            value = \"[Link](https://discord.gg/qfYekaJ)\",\n            inline = True\n        )\n        embed.add_field(\n            name = \"Vote\",\n            value = \"[Discord Bots](https://discordbots.org/bot/447493600167591936/vote)\\n\"\n                    \"[Discord Bot List](https://discordbotlist.com/bots/447493600167591936)\",\n            inline = True\n        )\n        embed.set_thumbnail(url = self.bot.user.avatar_url)\n\n        await ctx.send(embed = embed)\n\n    @commands.command()\n    async def invite(self, ctx):\n        \"\"\"Outputs the bot's invite link.\"\"\"\n\n        embed = discord.Embed(title = \"\", color = ykColor)\n        embed.set_author(\n            name = \"Click here to invite Yukiko to your server.\",\n            url = \"https://discordapp.com/oauth2/authorize?client_id=447493600167591936&permissions=8&scope=bot\",\n            icon_url = self.bot.user.avatar_url\n        )\n        await ctx.send(embed = embed)\n\n    @commands.command(aliases = [\"pfp\", u\"\\U0001f464\"])\n    async def avatar(self, ctx, member: discord.Member = None):\n        \"\"\"Outputs the member's avatar.\"\"\"\n\n        if member == None:\n            mem = ctx.message.author\n        else:\n            mem = member\n        # mem = ctx.message.guild.get_member_named(member)\n\n        embed_color = mem.top_role.color if ctx.guild else ykColor\n\n        embed = discord.Embed(title = \"\", description = \"Avatar\", color = embed_color)\n        embed.set_author(\n            name = str(mem),\n            icon_url = mem.avatar_url\n        )\n        embed.set_image(url = mem.avatar_url_as(static_format = \"png\")[:-4] + \"4096\")\n\n        await ctx.send(embed = embed)\n\n    @commands.command(aliases = [\"user\", \"member\", u\"\\U0001f465\"])\n    async def userinfo(self, ctx, member: discord.Member = None):\n        \"\"\"Outputs info about the member.\"\"\"\n\n        if member == None:\n            mem = ctx.message.author\n        else:\n            mem = member\n\n        status_dict = {\n            \"online\":  \"Online<:online:461118969575899136>\",\n            \"idle\":    \"Idle<:idle:461118969433161748>\",\n            \"dnd\":     \"Do Not Disturb<:dnd:461118969441419264>\",\n            \"offline\": \"Offline<:offline:461118969424904193>\"\n        }\n        status = status_dict[str(mem.status)] if ctx.guild else None\n\n        activity_dict = {\n            discord.ActivityType.playing:   \"Playing\",\n            discord.ActivityType.streaming: \"Streaming\",\n            discord.ActivityType.listening: \"Listening to\",\n            discord.ActivityType.watching:  \"Watching\"\n        }\n        try:\n            try:\n                activity_type = activity_dict[mem.activity.type]\n            except:\n                activity_type = \"Playing\"\n        except:\n            activity_type = None\n\n        cleaned_nick = await commands.clean_content(escape_markdown = True).convert(ctx, mem.nick)\n        activity_name = mem.activity.name if mem.activity else \"None\"\n        embed_color = mem.top_role.color if ctx.guild else ykColor\n\n        embed = discord.Embed(title = \"\", color = embed_color)\n        embed.set_author(\n            name = str(mem),\n            icon_url = mem.avatar_url\n        )\n        embed.set_thumbnail(url = mem.avatar_url)\n\n        embed.add_field(name = \"ID\", value = mem.id, inline = True)\n        if ctx.guild:\n            embed.add_field(name = \"Nickname\", value = cleaned_nick, inline = True)\n        embed.add_field(name = \"Bot?\", value = await self.get_check(mem.bot), inline = True)\n        if ctx.guild:\n            embed.add_field(name = \"Status\", value = status, inline = True)\n            embed.add_field(name = activity_type, value = activity_name, inline = True)\n            embed.add_field(name = \"Joined Guild\", value = await self.format_time(mem.joined_at), inline = True)\n        embed.add_field(name = \"Joined Discord\", value = await self.format_time(mem.created_at), inline = True)\n        embed.add_field(name = \"Mention\", value = mem.mention, inline = False)\n        if ctx.guild:\n            embed.add_field(name = \"Roles\", value = \"@everyone \" + ' '.join([r.mention for r in mem.roles[1:]]), inline = True)\n\n        await ctx.send(embed = embed)\n\n    @commands.command(aliases = [\"guild\", \"server\", \"serverinfo\"])\n    @commands.guild_only()\n    async def guildinfo(self, ctx):\n        \"\"\"Outputs info about the guild.\"\"\"\n\n        \"\"\"if guild == None:\n            gld = ctx.message.guild\n        elif guild.isdigit():\n            # gld = ctx.message.guild\n            await ctx.send(\"Specifying guild not supported yet.\")\"\"\"\n\n        gld = ctx.guild\n\n        roles_list = [\"@everyone\"]\n        if len(gld.roles) > 10:\n            roles_list = [f\"{len(gld.roles)} roles.\"]\n        else:\n            for role in gld.roles[1:]:\n                roles_list.append(role.mention)\n            if len(roles_list) == 0:\n                roles_list.append(\"None\")\n\n        text_channels_list = []\n        if len(gld.text_channels) > 10:\n            text_channels_list.append(f\"{len(gld.text_channels)} channels.\")\n        else:\n            for channel in gld.text_channels:\n                text_channels_list.append(channel.mention)\n            if len(text_channels_list) == 0:\n                text_channels_list.append(\"None\")\n\n        voice_channels_list = []\n        if len(gld.voice_channels) > 10:\n            voice_channels_list.append(f\"{len(gld.voice_channels)} voice channels.\")\n        else:\n            for channel in gld.voice_channels:\n                voice_channels_list.append(channel.name)\n            if len(voice_channels_list) == 0:\n                voice_channels_list.append(\"None\")\n\n        emojis_list = []\n        if len(' '.join(str(gld.emojis))) > 1024:\n            emojis_list.append(f\"{len(gld.emojis)} emojis.\")\n        else:\n            for emoji in gld.emojis:\n                emojis_list.append(str(emoji))\n            if len(emojis_list) == 0:\n                emojis_list.append(\"None\")\n        \n        afk_timeout_dict = {\n            60:   \"1 minute\",\n            300:  \"5 minutes\",\n            900:  \"15 minutes\",\n            1800: \"30 minutes\",\n            3600: \"1 hour\"\n        }\n        content_filter_dict = {\n            \"disabled\":    \"Don't scan any messages.\",\n            \"no_role\":     \"Scan messages from members without a role.\",\n            \"all_members\": \"Scan messages sent by all members.\"\n        }\n        region_dict = {\n            \"us-west\":       \"US West\",\n            \"us-east\":       \"US East\",\n            \"us-south\":      \"US South\",\n            \"us-central\":    \"US Central\",\n            \"eu-west\":       \"EU West\",\n            \"eu-central\":    \"EU Central\",\n            \"singapore\":     \"Singapore\",\n            \"london\":        \"London\",\n            \"sydney\":        \"Sydney\",\n            \"amsterdam\":     \"Amsterdam\",\n            \"frankfurt\":     \"Frankfurt\",\n            \"brazil\":        \"Brazil\",\n            \"hongkong\":      \"Hong Kong\",\n            \"russia\":        \"Russia\",\n            \"vip-us-east\":   \"VIP US East\",\n            \"vip-us-west\":   \"VIP US West\",\n            \"vip-amsterdam\": \"VIP Amsterdam\",\n\n            \"japan\": \"Japan\",\n            \"southafrica\": \"South Africa\"\n        }\n        verification_level_dict = {\n            \"none\":    \"None\",\n            \"low\":     \"Low\",\n            \"medium\":  \"Medium\",\n            \"high\":    \"High\",\n            \"extreme\": \"Extreme\"\n        }\n        afk_timeout = afk_timeout_dict[gld.afk_timeout]\n        afk_channel = str(gld.afk_channel.mention if gld.afk_channel else None)\n        content_filter = content_filter_dict[gld.explicit_content_filter.name]\n        region = region_dict[str(gld.region)]\n        verification_level = verification_level_dict[str(gld.verification_level)]\n        \n        embed = discord.Embed(title = \"\", color = ykColor)\n        embed.set_author(name = gld.name, icon_url = gld.icon_url)\n        embed.set_thumbnail(url = gld.icon_url)\n        embed.add_field(name = \"ID\", value = str(gld.id), inline = True)\n        embed.add_field(name = \"Owner\", value = gld.owner.mention, inline = True)\n        embed.add_field(name = \"Region\", value = region, inline = True)\n        embed.add_field(name = \"Created at\", value = await self.format_time(gld.created_at), inline = True)\n\n        embed.add_field(name = \"Member Count\", value = str(gld.member_count), inline = True)\n        embed.add_field(name = \"Roles\", value = ' '.join(roles_list), inline = True)\n        embed.add_field(name = \"Text Channels\", value = ' '.join(text_channels_list), inline = True)\n        embed.add_field(name = \"Voice Channels\", value = \", \".join(voice_channels_list), inline = True)\n        # embed.add_field(name = \"Default Channel\", value = \"Soon...\", inline = True)\n        embed.add_field(name = \"Emojis\", value = ''.join(emojis_list), inline = True)\n        embed.add_field(name = \"Verification Level\", value = verification_level, inline = True)\n        # embed.add_field(name = \"MFA Level\", value = \"Soon...\", inline = True)\n        # embed.add_field(name = \"Default Notification Level\", value = \"Soon...\", inline = True)\n\n        embed.add_field(name = \"Invite Splash\", value = str(gld.splash), inline = True)\n        embed.add_field(name = \"Explicit Content Filter\", value = content_filter, inline = True)\n        embed.add_field(name = \"AFK Voice Timeout\", value = afk_timeout, inline = True)\n        embed.add_field(name = \"AFK Voice Channel\", value = afk_channel, inline = True)\n\n        embed.add_field(name = \"Has VIP Regions?\", value = await self.get_check(\"VIP_REGIONS\" in gld.features), inline = True)\n        embed.add_field(name = \"Has a Custom URL?\", value = await self.get_check(\"VANITY_URL\" in gld.features), inline = True)\n        embed.add_field(name = \"Has Special Invite Splash?\", value = await self.get_check(\"INVITE_SPLASH\" in gld.features), inline = True)\n        embed.add_field(name = \"Verified?\", value = await self.get_check(\"VERIFIED\" in gld.features), inline = True)\n        embed.add_field(name = \"More Emoji?\", value = await self.get_check(\"MORE_EMOJI\" in gld.features), inline = True)\n\n        await ctx.send(embed = embed)\n\n    @commands.command(aliases = [\"emoji\", \"emote\", \"emoteinfo\", u\"\\U0001f61c\"])\n    async def emojiinfo(self, ctx, emoji: discord.Emoji = None):\n        \"\"\"Outputs info about the emoji.\"\"\"\n\n        # emoID = int(emoji.split(\":\")[2][:-1])\n\n        emo = emoji\n\n        roles_list = []\n        if False:  # len(gld.roles) > 10\n            roles_list.append(f\"{len(gld.roles)} roles.\")\n        else:\n            for role in emo.roles[1:]:\n                roles_list.append(role.mention)\n            if len(roles_list) == 0:\n                roles_list.append(\"@everyone\") # \"Unrestricted\"\n\n        embed = discord.Embed(title = \"\", color = ykColor)\n        embed.set_author(name = emo.name, icon_url = emo.url)\n        embed.set_thumbnail(url = emo.url)\n        embed.add_field(name = \"ID\", value = emo.id, inline = True)\n        embed.add_field(name = \"Guild\", value = str(emo.guild), inline = True)\n        embed.add_field(name = \"Guild ID\", value = str(emo.guild_id), inline = True)\n        embed.add_field(name = \"Created at\", value = await self.format_time(emo.created_at), inline = True)\n        embed.add_field(name = \"Roles\", value = ' '.join(roles_list), inline = True)\n        embed.add_field(name = \"Animated\", value = await self.get_check(emo.animated), inline = True)\n        embed.add_field(name = \"Managed?\", value = await self.get_check(emo.managed), inline = True)\n        embed.add_field(name = \"Require Colons?\", value = await self.get_check(emo.require_colons), inline = True)\n\n        await ctx.send(embed = embed)\n\n    @commands.command(aliases = (\"channel\", \"chan\", \"cha\", \"ct\"))\n    async def channelinfo(self, ctx, channel: discord.TextChannel = None):\n        \"\"\"Outputs info about the channel.\"\"\"\n\n        if ctx.guild:\n            if channel == None:\n                cha = ctx.channel\n            else:\n                cha = channel\n\n            if not len(cha.changed_roles) == 0:\n                changed_roles = \"@everyone \" + ' '.join([r.mention for r in cha.changed_roles[1:]])\n            else:\n                changed_roles = None\n\n            embed = discord.Embed(title = '#' + cha.name, description = cha.topic, color = ykColor)\n            embed.add_field(name = \"Guild\", value = cha.guild.name, inline = True)\n            embed.add_field(name = \"Category\", value = str(cha.category), inline = True)\n            embed.add_field(name = \"NSFW?\", value = await self.get_check(cha.nsfw), inline = True)\n            embed.add_field(name = \"Position in List\", value = cha.position + 1, inline = True)\n            embed.add_field(name = \"Created at\", value = await self.format_time(cha.created_at), inline = True)\n            embed.add_field(name = \"Mention\", value = cha.mention, inline = True)\n            embed.add_field(name = \"Changed Roles\", value = str(changed_roles), inline = True)\n\n            await ctx.send(embed = embed)\n\n    @commands.command(aliases = [\"role\"])\n    @commands.guild_only()\n    async def roleinfo(self, ctx, role: discord.Role):\n        \"\"\"Outputs info about the role.\"\"\"\n\n        rol = role\n\n        embed = discord.Embed(description = rol.mention, color = rol.color)\n        embed.add_field(name = \"ID\", value = rol.id, inline = False)\n        embed.add_field(name = \"Name\", value = rol.name, inline = True)\n        embed.add_field(name = \"Guild\", value = str(rol.guild), inline = True)\n        # embed.add_field(name = \"Permissions\", value = \"Coming soon..\", inline = True)\n        embed.add_field(name = \"Created at\", value = await self.format_time(rol.created_at), inline = True)\n        embed.add_field(name = \"Position\", value = rol.position + 1, inline = True)\n        embed.add_field(name = \"Show in Online List?\", value = await self.get_check(rol.hoist), inline = True)\n        embed.add_field(name = \"Managed?\", value = await self.get_check(rol.managed), inline = True)\n        embed.add_field(name = \"Mentionable\", value = await self.get_check(rol.mentionable), inline = True)\n        embed.add_field(name = \"Default Role?\", value = await self.get_check(rol.is_default()), inline = True)\n        embed.add_field(name = \"Members with Role\", value = ' '.join([m.mention for m in rol.members]), inline = True)\n\n        await ctx.send(embed = embed)\n\n    @commands.command(aliases = [\"bot\", \"dbs\", \"dbsinfo\", u\"\\U0001f916\"])\n    async def botinfo(self, ctx, bot: discord.Member = None):\n        \"\"\"Outputs the DiscordBots stats of a bot.\"\"\"\n\n        bot = self.bot.get_user(447_493_600_167_591_936) if bot == None else bot\n\n        if bot.bot:\n            async with aiohttp.ClientSession() as session:\n                async with session.get(f\"https://discordbots.org/api/widget/{bot.id}.png\") as response:\n                    img_bytes = await response.read()\n\n            file = discord.File(filename = f\"{bot.id}.png\", fp = BytesIO(img_bytes))\n\n            await ctx.send(file = file)\n        else:\n            await yuki.send_error(\"User isn't a bot.\", ctx)\n\n    \"\"\"\"@commands.command(aliases = [\"urbandict\", u\"\\U0001f916\"])\n    async def urban(self, ctx, word: str = None):\"\"\"\n\ndef setup(bot):\n    bot.add_cog(Info(bot))"
  },
  {
    "path": "cogs/nsfw.py",
    "content": "import discord\nfrom discord.ext import commands\nfrom yuki import color as ykColor\nimport yuki\n\nimport aiohttp\nimport asyncio\n\nfrom rule34 import Rule34\nfrom random import choice, sample\n\nclass NSFW:\n    def __init__(self, bot):\n        self.bot = bot\n\n        self.nsfw_emojis = (\n            \"<a:succ_nsfw:480755220926693376>\",\n            \"<a:milky_nsfw:480755218552848385>\",\n\n            \"<:grip_nsfw:481828361069658147>\",\n            \"<:lenny_nsfw:481828458230579200>\",\n            \"<:fruitsex_nsfw:480755216505896972>\",\n            \"<:peachy_nsfw:497799370897489923>\",\n            \"<:eggblow_nsfw:497799325695475732>\"\n        )\n    @commands.group(aliases = [\"r34\"])\n    @commands.is_nsfw()\n    async def rule34(self, ctx):\n        pass\n\n    @rule34.group(aliases = [\"rand\", \"r\"])\n    async def random(self, ctx, *, tags: str):\n        \"\"\"Outputs a random image from Rule 34.\"\"\"\n\n        tags = ['_'.join(tag.strip().split()) for tag in tags.split('+')]\n\n        async with ctx.typing():\n            r34 = Rule34(asyncio.get_event_loop())\n            results = await r34.getImageURLS(*tags)\n\n            if results:\n                result = choice(results)\n                emoji = choice(self.nsfw_emojis)\n\n                embed = discord.Embed(description = f\"{emoji} Rule34\", color = ykColor)\n                embed.set_image(url = result)\n                embed.set_footer(text = \"Tag(s): {}\".format(\", \".join(tags)))\n\n                await ctx.send(embed = embed)\n            else:\n                await yuki.send_error(\"No results found.\", ctx)\n\n    @rule34.group(aliases = [\"b\"])\n    async def bomb(self, ctx, *, tags: str):\n        \"\"\"Outputs random images from Rule 34.\"\"\"\n        \n        tags = ['_'.join(tag.strip().split()) for tag in tags.split('+')]\n\n        async with ctx.typing():\n            r34 = Rule34(asyncio.get_event_loop())\n            results = await r34.getImageURLS(*tags)\n\n            if results:\n                if len(results) >= 5:\n                    output = '\\n'.join(sample(results, 5))\n                else:\n                    output = '\\n'.join(results)\n                await ctx.send(output)\n            else:\n                await yuki.send_error(\"No results found.\", ctx)\n\ndef setup(bot):\n    bot.add_cog(NSFW(bot))"
  },
  {
    "path": "cogs/owner.py",
    "content": "import discord\nfrom discord.ext import commands\nfrom yuki import color as ykColor\nimport yuki\n\nimport sys\nfrom io import StringIO\nimport traceback\nimport platform\n\nimport logging\nimport asyncio\n\n# import lupa\n# from lupa import LuaRuntime\n\nimport time\n\nclass Owner:\n    def __init__(self, bot):\n        self.bot = bot\n\n        self.allowed_users = (\n            self.bot.owner_id,\n            357_641_367_507_435_531,  # Slick9000#7159\n            314_885_561_552_994_305,  # Simon#2018\n            992_727_670_603_284_48,   # Netux#2308\n        )\n\n    @commands.group(hidden = True, aliases = [\"py\", u\"\\U0001f40d\"])\n    async def python(self, ctx):\n        \"\"\"Commands to do with using Python.\"\"\"\n\n        pass\n\n    @python.command(name = \"exec\", aliases = [\"run\"])\n    async def exec_(self, ctx, *, code: str = \"print(\\\"Hello, World!\\\")\"):\n        \"\"\"Executes Python 3 code.\"\"\"\n\n        if ctx.author.id not in self.allowed_users:\n            # await ctx.send(\"You don't have access to this command.\")\n            await yuki.send_error(\"You don't have access to this command.\", ctx, icon = u\"\\U000026d4\")\n        else:\n            async with ctx.typing():\n                old_stdout = sys.stdout\n                old_stderr = sys.stderr\n                sys.stdout = redir_stdout = StringIO()\n                sys.stderr = redir_stderr = StringIO()\n\n                try:\n                    exec(code)\n\n                    # If the code was successful, it would set exc to \"\".\n                    # If not, it would do except anyway.\n                    exc = \"\"\n                except:\n                    exc = traceback.format_exc()\n\n                out = redir_stdout.getvalue()\n                err = redir_stderr.getvalue()\n\n                out = f\"```\\n{out}```\" if out else \"No standard output.\"\n                err = f\"```\\n{err}```\" if err else \"No error output.\"\n                exc = f\"```\\n{exc}```\" if exc else \"No exception.\"\n\n                embed = discord.Embed(title = \"\", color = ykColor)\n                embed.set_author(name = f\"Python { platform.python_version() }\", icon_url = \"https://cdn.discordapp.com/emojis/447523942949715969.png?v=1\")\n                embed.add_field(name = \"Executed\", value = f\"```py\\n{code}```\", inline = False)\n                embed.add_field(name = \"Standard Output\", value = out, inline = False)\n                embed.add_field(name = \"Error Output\", value = err, inline = False)\n                embed.add_field(name = \"Exception\", value = exc, inline = False)\n                embed.set_thumbnail(url = \"https://cdn.discordapp.com/emojis/447523942949715969.png?v=1\")\n                # embed.set_footer(text = \"Python \" + platform.python_version(), icon_url = \"https://cdn.discordapp.com/emojis/447523942949715969.png?v=1\")\n\n                sys.stdout = old_stdout\n                sys.stderr = old_stderr\n\n                await ctx.send(embed = embed)\n\n    @python.command(name = \"eval\")\n    async def eval_(self, ctx, *, code: str):\n        \"\"\"Evaluates Python 3 code.\"\"\"\n\n        if ctx.author.id not in self.allowed_users:\n            # await ctx.send(\"You don't have access to this command.\")\n            await yuki.send_error(\"You don't have access to this command.\", ctx, icon = u\"\\U000026d4\")\n        else:\n            async with ctx.typing():\n                try:\n                    ret = eval(code)\n\n                    # If the code was successful, it would set exc to \"\".\n                    # If not, it would do except anyway.\n                    exc = \"\"\n                except:\n                    exc = traceback.format_exc()\n\n                output = f\"```{ret}```\" if not exc else f\"```{exc}```\"\n                await ctx.send(output)\n\n    @commands.command(name = \"load\", hidden = True)\n    @commands.is_owner()\n    async def cog_load(self, ctx, *, cog: str):\n        \"\"\"Loads a cog.\"\"\"\n\n        try:\n            self.bot.load_extension(cog)\n        except Exception as e:\n            # await ctx.send(f'**`ERROR:`** {type(e).__name__} - {e}')\n            await ctx.message.add_reaction(yuki.cross_mark)\n            logging.error(f'Load Cog Error: {type(e).__name__} - {e}')\n        else:\n            # await ctx.send('**`SUCCESS`**')\n            await ctx.message.add_reaction(u\"\\u2705\")\n\n    @commands.command(name = \"unload\", hidden = True)\n    @commands.is_owner()\n    async def cog_unload(self, ctx, *, cog: str):\n        \"\"\"Unloads a cog.\"\"\"\n\n        try:\n            self.bot.unload_extension(cog)\n        except Exception as e:\n            # await ctx.send(f'**`ERROR:`** {type(e).__name__} - {e}')\n            await ctx.message.add_reaction(yuki.cross_mark)\n            logging.error(f'Unload Cog Error: {type(e).__name__} - {e}')\n        else:\n            # await ctx.send('**`SUCCESS`**')\n            await ctx.message.add_reaction(u\"\\u2705\")\n\n    @commands.command(name = \"reload\", hidden = True)\n    @commands.is_owner()\n    async def cog_reload(self, ctx, *, cog: str):\n        \"\"\"Reloads a cog.\"\"\"\n\n        try:\n            self.bot.unload_extension(cog)\n            self.bot.load_extension(cog)\n        except Exception as e:\n            # await ctx.send(f'**`ERROR:`** {type(e).__name__} - {e}')\n            await ctx.message.add_reaction(yuki.cross_mark)\n            logging.error(f'Reload Cog Error: {type(e).__name__} - {e}')\n        else:\n            # await ctx.send('**`SUCCESS`**')\n            await ctx.message.add_reaction(u\"\\u2705\")\n\ndef setup(bot):\n    bot.add_cog(Owner(bot))"
  },
  {
    "path": "cogs/stars.py",
    "content": "import discord\nfrom discord.ext import commands\nfrom yuki import color as ykColor\nimport yuki\n\nimport typing\nfrom io import BytesIO\n\nclass Stars:\n    def __init__(self, bot):\n        self.bot = bot\n\n        # self.prefix = self.bot.command_prefix(self.bot, ctx)[-1]\n        self.star_color = 0xffac33\n        self.star_icon = \"https://discordapp.com/assets/e4d52f4d69d7bba67e5fd70ffe26b70d.svg\"\n        self.star_emoji = u\"\\u2B50\"\n\n        self.channel_topic = u\"\\u2B50 A starboard where you can star messages by doing {prefix}star. \\u2B50\"\n\n        self.webhook_name = \"Star\"\n        self.webhook_icon = \"https://cdn.discordapp.com/attachments/447786789563006986/494581408661110794/star.png\"\n\n    async def _star(self, ctx, messageid):\n        msg = await ctx.channel.get_message(messageid)\n        cha = await self._get_starboard(ctx.guild)\n\n        star_content = await commands.clean_content().convert(ctx, msg.content)\n        star_username = msg.author.display_name\n        star_avatar = msg.author.avatar_url_as(format = \"png\")\n\n        star_embed = discord.Embed(\n            colour = self.star_color,\n            description = f\"[Jump to the message!]({msg.jump_url})\",\n            timestamp = msg.created_at\n        )\n        star_embed.set_footer(text = \"Starred\", icon_url = self.webhook_icon)\n        star_embed.add_field(name = \"Author\", value = msg.author.mention, inline = True)\n        star_embed.add_field(name = \"Channel\", value = msg.channel.mention, inline = True)\n\n        if len(msg.embeds) <= 10:\n            star_embeds = list(msg.embeds[:9]) + [star_embed]\n        else:\n            star_embeds = list(msg.embeds) + [star_embed]\n\n        webhook = discord.utils.get(await cha.webhooks(), name = self.webhook_name)\n\n        if len(msg.attachments) == 0:\n            star_file = None\n        else:\n            fp = BytesIO()\n            attachment = msg.attachments[0]\n            await attachment.save(fp)\n            star_file = discord.File(fp = fp, filename = attachment.filename)\n\n        await webhook.send(\n            content    = star_content,\n            embeds     = star_embeds,\n            file       = star_file,\n            username   = star_username,\n            avatar_url = star_avatar\n        )\n\n    async def _get_starboard(self, guild):\n        # cha = discord.utils.get(gld.channels, name = cha_name)\n        for channel in guild.text_channels:\n            if await self._check_if_starboard(channel):\n                return channel\n\n    async def _check_if_starboard(self, channel):\n        webhook = discord.utils.get(await channel.webhooks(), name = self.webhook_name)\n        return bool(webhook)\n\n    @commands.command(hidden = True)\n    @commands.has_permissions(manage_webhooks = True)\n    @commands.is_owner()\n    async def setupstar(self, ctx, channel: typing.Union[discord.TextChannel, str] = None):\n        \"\"\"Creates a starboard for ``.yk star``.\"\"\"\n\n        gld = ctx.guild\n        prefix = self.bot.command_prefix(self.bot, ctx)[-1]\n\n        if isinstance(channel, str):\n            cha_name = channel.lower()\n        elif isinstance(channel, str):\n            cha_name = channel.name\n        else:\n            cha_name = \"starboard\"\n\n        # Create the channel if it doesn't exist already.\n        if isinstance(channel, discord.TextChannel):\n            cha = channel\n        elif isinstance(channel, str):\n            cha = discord.utils.get(gld.channels, name = cha_name)\n\n        if cha:\n            pass\n        else:\n            try:\n                cha = await gld.create_text_channel(name = cha_name, reason = f\"{ctx.author} used the setupstar command.\")\n\n                \"\"\"embed = discord.Embed(description = \"\", color = self.star_color)\n                embed.set_author(\n                    name = f\"Successfully created channel #{cha_name}.\",\n                    icon_url = \"https://cdn.discordapp.com/attachments/447786789563006986/476225004015452160/plus_icon.png\"\n                )\n\n                await ctx.send(embed = embed)\"\"\"\n            except:\n                if len(gld.channels) <= 500:\n                    await yuki.send_error(f\"No space left to create #{cha_name}.\", ctx)\n                else:\n                    await yuki.send_error(f\"Couldn't create starboard channel #{cha_name}.\", ctx)\n\n                return\n\n        # Edit the channel topic if it isn't the same.\n        if cha.topic == self.channel_topic:\n            pass\n        else:\n            await cha.edit(topic = self.channel_topic.format(prefix = prefix))\n\n        # Create the webhook if it doesn't exist already.\n        webhook = discord.utils.get(await cha.webhooks(), name = self.webhook_name)\n        if webhook:\n            pass\n        else:\n            try:\n                await cha.create_webhook(name = self.webhook_name, avatar = self.webhook_icon)\n            except:\n                await yuki.send_error(\"Couldn't create webhook.\", ctx)\n\n                return\n\n        embed = discord.Embed(color = self.star_color)\n        embed.set_author(name = f\"Successfully setup #{cha_name} for use with stars.\", icon_url = self.star_icon)\n\n        await ctx.send(embed = embed)\n\n        self.star_icon = \"https://discordapp.com/assets/e4d52f4d69d7bba67e5fd70ffe26b70d.svg\"\n\n        self.channel_topic = u\"\\u2B50 A starboard where you can star messages by doing {prefix}star. \\u2B50\"\n\n        self.webhook_name = \"Star\"\n        self.webhook_icon = \"https://cdn.discordapp.com/attachments/447786789563006986/494581408661110794/star.png\"\n\n    @commands.command(hidden = True)\n    async def star(self, ctx, messageid: int):\n        \"\"\"Stars a message.\"\"\"\n\n        await self._star(ctx, messageid)\n\ndef setup(bot):\n    bot.add_cog(Stars(bot))"
  },
  {
    "path": "cogs/tests.py",
    "content": "import discord\nfrom discord.ext import commands\nfrom yuki import color as ykColor\nimport yuki\n\n\"\"\"\nimport js2py\nimport aiohttp\nfrom minigames import TicTacToe\nfrom discord.ext.commands.formatter import HelpFormatter\"\"\"\n\nfrom minigames import FloodIt\nfrom io import BytesIO\nimport asyncio\n\nclass Experimental:\n    def __init__(self, bot):\n        self.bot = bot\n\n    @commands.command(aliases = [u\"\\U0001f50a\"])\n    @commands.guild_only()\n    @commands.is_owner()\n    async def play(self, ctx, *, sound: str = \"YOU SUCK\"):\n        \"\"\"Plays a sound.\"\"\"\n\n\n        \"\"\"voice = await bot.join_voice_channel(ctx.message.author.voice.voice_channel)\n        player = voice.create_ffmpeg_player(\"./sounds/suck.mp3\")\n        player.start()\n        if ctx.me.voice.channel ==  ctx.message.author.voice.channel:\"\"\"\n        \n\n        \"\"\"if ctx.message.guild.voice_client.channel != ctx.message.author.voice.channel:\n            await ctx.message.guild.voice_client.move_to(ctx.message.author.voice.channel)\n        elif ctx.message.guild.voice_client.channel == ctx.message.author.voice.channel:\n            await ctx.message.guild.voice_client.disconnect()\n        elif ctx.message.guild.voice_client.channel == None:\n            pass\n\n        voice = await ctx.message.author.voice.channel.connect()\n\n        # voice.move_to(ctx.message.author.voice.channel)\n        voice.play(discord.FFmpegPCMAudio(\"./assets/sounds/\" + sound.upper() + \".mp3\"))\"\"\"\n\n        if ctx.guild.voice_client == None:\n            voice = await ctx.message.author.voice.channel.connect()\n        else:\n            voice = ctx.guild.voice_client\n            await voice.move_to(ctx.message.author.voice.channel)\n        voice.play(discord.FFmpegPCMAudio(f\"./assets/sounds/{ sound.lower() }.mp3\"))\n\n    \"\"\"@commands.command(aliases = (\"member\", \"memberinfo\", \"user\", \"pfp\"))\n    async def userinfo(self, ctx, *, member: str):\n        Gives info about the member.\n\n        mem = ctx.message.guild.get_member_named(member)\n        embed = discord.Embed(title = mem.name + \"'s Avatar\", description = mem.name, color = ykColor)\n\n        await ctx.send(embed = embed)\"\"\"\n\n    \"\"\"@commands.command()\n    async def exec(self, ctx):\n        js = \n        var repl = new ReplitClient('api.repl.it', 80, 'ruby', token);\n        repl.connect().then(() =>\n            repl.evaluate(\n                'puts \"hello world\"',\n                { stdout: out => return(out) }\n            );\n        });\n        .replace(\"document.write\", \"return \")\n        result = js2py.eval_js(js)\n\n        await ctx.send(result)\"\"\"\n\n    \"\"\"@commands.command(aliases = [\"ttt\"])\n    async def tictactoe(self, ctx, *, sound: str = \"YOU SUCK\"):\"\"\"\n\n    \"\"\"@commands.command(aliases = [\"type\"])\n    async def typewrite(self, ctx, *, text: str):\n        Bot typewrites whatever text you give.\n\n        text = ''.join(text)\n\n        a = text[0]\n        msg = await ctx.send(text[0])\n        async with ctx.typing():\n            for char in text[1:]:\n                await asyncio.sleep(0.1)\n                a += char\n                await msg.edit(content = a)\"\"\"\n\n    \"\"\"@commands.command()\n    async def joke(self, ctx):\n        Gives you a random joke.\n\n        async with aiohttp.ClientSession() as session:\n            async with session.get(\"https://icanhazdadjoke.com/\") as resp:\n                print(await resp.json())\"\"\"\n\n    @commands.command(aliases = [\"flood-it\"])\n    async def floodit(self, ctx):\n        game = FloodIt()\n\n        output_buf = BytesIO()\n        game.field.save(output_buf, \"png\")\n        output_buf.seek(0)\n\n        embed = discord.Embed(title = \"Flood-It\", color = ykColor)\n        file = discord.File(filename = \"floodit.png\", fp = output_buf)\n        embed.set_image(url = \"attachment://floodit.png\")\n\n        msg = await ctx.send(embed = embed, file = file)\n        for color in game.colors.keys():\n            emoji = discord.utils.get(self.bot.get_guild(459754073382715393).emojis, name = color)\n            await msg.add_reaction(emoji)\n\n        def check(reaction, user):\n            return user == ctx.author\n\n        while not game.isFull():\n            try:\n                reaction, user = await self.bot.wait_for(\"reaction_add\", timeout = 60 * 2, check = check)\n                game.next(str(reaction).split(':')[1])\n\n                output_buf = BytesIO()\n                game.field.save(output_buf, \"png\")\n                output_buf.seek(0)\n\n                embed = msg.embeds[0]\n                file = discord.File(filename = \"floodit.png\", fp = output_buf)\n                embed.set_image(url = \"attachment://floodit.png\")\n\n                # await msg.edit(embed = embed, file = file)\n\n                await msg.remove_reaction(reaction, ctx.author)\n            except asyncio.TimeoutError:\n                # await ctx.send(\"Flood-It game ended!\")\n                await msg.clear_reactions()\n                return\n\n    @commands.command(aliases = [u\"\\U0001f4cc\"])\n    @commands.has_permissions(manage_messages = True)\n    async def pin(self, ctx, messageid: int = None):\n        \"\"\"Pins a message by either reacting to the message or specifying the id.\"\"\"\n\n        if messageid:\n            try:\n                message = await ctx.get_message(id = messageid)\n            except:\n                message = None\n                await yuki.send_error(\"Message doesn't exist.\", ctx)\n\n            if message and message.pinned:\n                await yuki.send_error(\"Message is already pinned.\", ctx)\n            else:\n                try:\n                    await message.pin()\n                    return\n                except:\n                    await yuki.send_error(\"Couldn't pin message.\", ctx)\n        else:\n            check = lambda r, u: u == ctx.author and r == '\\N{PUSHPIN}'\n\n            try:\n                reaction, user = await self.bot.wait_for(\"reaction_add\", check = check)\n            except asyncio.TimeoutError:\n                await yuki.send_error(\"Ran out of time to pin message.\", ctx)\n\ndef setup(bot):\n    bot.add_cog(Experimental(bot))"
  },
  {
    "path": "cogs/text.py",
    "content": "import discord\nfrom discord.ext import commands\nfrom yuki import color as ykColor\nimport yuki\n\nimport upsidedown\nfrom pyfiglet import Figlet\nimport cowsay\n\nimport sys\nfrom io import StringIO\n\n# import emoji\n\nclass Text:\n    def __init__(self, bot):\n        self.bot = bot\n    \n    @commands.command(aliases = [u\"\\U0001f4ac\"])\n    async def say(self, ctx, *, text: str):\n        \"\"\"Outputs text deleting the original message.\"\"\"\n\n        if not ctx.author.guild_permissions.administrator:\n            text = await commands.clean_content().convert(ctx, text)\n\n        await ctx.send(text)\n        await ctx.message.delete()\n\n    @commands.command(aliases = [\"talk\", \"speak\", u\"\\U0001f5e3\"])\n    async def tts(self, ctx, *, text: commands.clean_content):\n        \"\"\"Text-to-speech text.\"\"\"\n\n        await ctx.send(text, tts = True)\n        # await ctx.message.delete()\n\n    @commands.command()\n    async def echo(self, ctx, *, text: commands.clean_content):\n        \"\"\"Outputs text.\"\"\"\n\n        await ctx.send(text)\n\n    @commands.command(aliases = [\"upside\", \"upsidedown\", u\"\\U0001f643\"])\n    async def updown(self, ctx, *, text: commands.clean_content):\n        \"\"\"Outputs text upside down.\"\"\"\n\n        output = await commands.clean_content().convert(ctx, upsidedown.transform(text))\n        await ctx.send(output)\n\n    @commands.command()\n    async def dank(self, ctx, *, text: commands.clean_content):\n        \"\"\"Outputs text in **``d a n k  l e t t e r s``**.\"\"\"\n\n        dankText = (' ' * 1).join(text)\n        await ctx.send(f\"**```{dankText}```**\")\n\n    @commands.command(aliases = [\"uppercase\", \"caps\"])\n    async def upper(self, ctx, *, text: commands.clean_content):\n        \"\"\"Outputs text in uppercase letters.\"\"\"\n\n        output = await commands.clean_content().convert(ctx, text.upper())\n        await ctx.send(output)\n\n    @commands.command(aliases = [\"lowercase\"])\n    async def lower(self, ctx, *, text: commands.clean_content):\n        \"\"\"Outputs text in lowercase letters.\"\"\"\n\n        output = await commands.clean_content().convert(ctx, text.lower())\n        await ctx.send(output)\n\n    @commands.command()\n    async def title(self, ctx, *, text: commands.clean_content):\n        \"\"\"Outputs text Like A Title.\"\"\"\n\n        output = await commands.clean_content().convert(ctx, text.title())\n        await ctx.send(output)\n\n    @commands.command()\n    async def capitalize(self, ctx, *, text: commands.clean_content):\n        \"\"\"Outputs text that's Capitalized.\"\"\"\n\n        output = await commands.clean_content().convert(ctx, text.capitalize())\n        await ctx.send(output)\n\n    @commands.command()\n    async def swapcase(self, ctx, *, text: commands.clean_content):\n        \"\"\"Outputs text iN sWAPCASE.\"\"\"\n\n        output = await commands.clean_content().convert(ctx, text.swapcase())\n        await ctx.send(output)\n\n    @commands.command()\n    async def reverse(self, ctx, *, text: commands.clean_content):\n        \"\"\"Outputs text in reverse.\"\"\"\n\n        output = await commands.clean_content().convert(ctx, text[::-1])\n        await ctx.send(output)\n\n    @commands.command(aliases = [\"\\U0001f44f\"])\n    async def clap(self, ctx, *text: commands.clean_content):\n        u\"\"\"Outputs \\U0001f44f text \\U0001f44f like \\U0001f44f this.\"\"\"\n\n        text = (\"Meme\", \"Review\") if text == () else text\n\n        seperator = \" \\N{CLAPPING HANDS SIGN} \"\n        await ctx.send(seperator.join(text))\n\n    @commands.command(aliases = [\"capsizer\", \"altcase\"])\n    async def altcaps(self, ctx, *, text: commands.clean_content):\n        \"\"\"Outputs text, iN \"aLtCaPs\".\"\"\"\n\n        output = \"\"\n        upper = False\n        for char in text:\n            if upper:\n                output += char.upper()\n            else:\n                output += char.lower()\n            if char.isalpha():\n                upper = not upper\n\n        output = await commands.clean_content().convert(ctx, output)\n        await ctx.send(output)\n\n    @commands.command()\n    async def figlet(self, ctx, *, text: commands.clean_content):\n        \"\"\"Outputs text in FIGlet letters.\"\"\"\n\n        f = Figlet(font = \"standard\")\n        rendered_text = f.renderText(text)\n        output = f\"```{rendered_text}```\" if rendered_text != \"\" else \"No output.\"\n\n        await ctx.send(output)\n\n    @commands.command(aliases = [\"meemspeak\", \"meemspeek\", \"memespeek\"])\n    async def memespeak(self, ctx, *, text: commands.clean_content):\n        \"\"\"Outputs text in memespeak.\"\"\"\n        # NOTE: Don't take any of this seriously\n\n        translations = {\n            \"boy\": \"boi\",\n            \"meme\": \"meem\",\n            \"play\": \"plae\",\n            \"game\": \"gaem\",\n            \"stupid\": \"stoopid\",\n            \"vagina\": \"vagene\",\n            \"dick\": \"dic\",\n            \"libretro\": \"libret\",\n            \"lol\": \"lole\",\n            \"think\": \"thonk\",\n            \"spanish\": \"despacito\",\n            \"gay\": \"gae\",\n            \"lesbian\": \"les\",\n            \"spaghetti\": \"spaget\",\n            \"cute\": \"kewt\",\n            \"love\": \"luv\",\n            \"sex\": \"secks\",\n            \"sexy\": \"secksy\",\n            \"suck\": \"succ\",\n            \"sucks\": \"sux\",\n            \"thick\": \"thicc\",\n            \"haha\": \"lole\",\n            \"rofl\": \"rolf\",\n            \"youtube\": \"utoob\",\n            \"nigga\": \"nibba\",\n            \"fucking\": \"fakking\",\n            \"pussy\": \"pussi\",\n            \"boobs\": \"bobs\",\n            \"boob\": \"bob\",\n            \"roblox\": \"roblocks\",\n            \"blocks\": \"blox\",\n            \"bucks\": \"bux\",\n            \"please\": \"pls\",\n            \" though \": \" tho \",\n            \"yeah\": \"yeh\",\n            \"sup\": \"suh\",\n            \"what's up\": \"wassup\",\n            \"speak\": \"speek\",\n            \"okay\": \"ok\",\n            \"when\": \"wen\",\n            \"what\": \"wat\",\n            \"I \": \"me \",\n            \"you\": \"u\",\n            \"oh \": \"o \",\n            \"your \": \"ur \",\n            \"you \": \"u\",\n            \"you're \": \"u r \",\n            \"and \": \"& \"\n        }\n\n        output = text\n        for word, translation in translations.items():\n            output = output.replace(word, translation)\n\n        output = await commands.clean_content().convert(ctx, output)\n        await ctx.send(output)\n\n    @commands.command(aliases = [u\"\\U0001f42e\", u\"\\U0001f404\"])\n    async def cowsay(self, ctx, *, text: commands.clean_content):\n        \"\"\"Cow says whatever text you give.\"\"\"\n\n        old_stdout = sys.stdout\n        sys.stdout = redir_stdout = StringIO()\n\n        cowsay.cow(text)\n\n        out = redir_stdout.getvalue()\n        sys.stdout = old_stdout\n\n        await ctx.send(f\"```{out}```\")\n\ndef setup(bot):\n    bot.add_cog(Text(bot))"
  },
  {
    "path": "cogs/utils.py",
    "content": "import discord\nfrom discord.ext import commands\nfrom yuki import color as ykColor\nimport yuki\n\nimport time\nimport aiohttp\nimport random\n\nimport json\nfrom base64 import b64decode\n\nclass Utilities:\n    def __init__(self, bot):\n        self.bot = bot\n\n        self.ping_emoji = u\"\\U0001F3D3\"\n        # self.ping_emoji = \"\\N{TABLE TENNIS PADDLE AND BALL}\"\n        self.answers = (\n            \"Very doubtful\",\n            \"Most likely no\",\n            \"Perhaps\",\n            \"Definitely no\",\n            \"Not sure\",\n            \"No\",\n            \"NO - It may cause disease contraction\",\n            \"Nope\",\n            \"Don't even think about it\",\n            \"Don't count on it\",\n\n            \"It is uncertain\",\n            \"Ask again later\",\n\n            \"Yes\",\n            \"Of course!\",\n            \"Perhaps\",\n            \"My sources say yes\"\n        )\n\n    @commands.command(aliases = [u\"\\U0001f3d3\"])\n    async def ping(self, ctx):\n        \"\"\"Outputs the bot's ping.\"\"\"\n\n        t1 = time.perf_counter()\n        await ctx.trigger_typing() # Tell Discord that the bot is typing.\n        t2 = time.perf_counter()\n        time_delta = abs(round((t1 - t2) * 1000, 2)) # Calculate the time.\n\n        await ctx.send(content = f\"{self.ping_emoji} Pong! That took **{time_delta} ms**.\")\n\n    \"\"\"@commands.command(aliases = [u\"\\U0001f3d3\"])\n    async def ping(self, ctx):\n        Outputs the bot's ping.\n\n        start = time.perf_counter()\n        message = await ctx.send(f\"_{self.pingEmoji}_\")\n        end = time.perf_counter()\n        duration = (end - start) * 1000\n\n        output = \"{} Pong! That took **{:.2f} ms**.\".format(self.pingEmoji, duration)\n        await message.edit(content = output)\"\"\"\n\n    @commands.command()\n    async def poll(self, ctx, question: str = \"What game should we play?\", *options: str):\n        \"\"\"Starts a simple poll.\"\"\"\n\n        # ABCDEFGHI\n        letters = (\n            u\"\\U0001F1E6\", u\"\\U0001F1E7\", u\"\\U0001F1E8\", u\"\\U0001F1E9\",\n            u\"\\U0001F1EA\", u\"\\U0001F1EB\", u\"\\U0001F1EC\", u\"\\U0001F1ED\",\n            u\"\\U0001F1EE\"\n        )\n\n        mem = ctx.message.author\n        if ctx.guild:\n            embed_color = mem.top_role.color\n        else:\n            embed_color = ykColor\n\n        options = (\"Fortnite\", \"PUBG\") if options == () else options\n\n        embed = discord.Embed(title = question, color = embed_color)\n        embed.set_author(name = str(mem), icon_url = mem.avatar_url)\n\n        for i, option in enumerate(options):\n            embed.add_field(name = letters[i], value = option, inline = True)\n\n        msg = await ctx.send(embed = embed)\n        for i, option in enumerate(options):\n            await msg.add_reaction(letters[i])\n\n    \"\"\"@commands.command(pass_context = True)\n    async def reddit(self, ctx, *, subreddit: str = \"examplesubreddit\"):\n        subreddit = ''.join(subreddit).lower().replace(\" \", \"_\")\n        async with aiohttp.ClientSession() as cs:\n            async with cs.get(f\"https://api.reddit.com/r/{subreddit}/random\") as r:\n                data = await r.json()\n\n                embed = discord.Embed(title = \"T\", color = ykColor) # str(data[1][\"data\"][\"children\"][0][\"data\"][\"body\"])\n                embed.set_image(url = data[0][\"data\"][\"children\"][0][\"data\"][\"url\"])\n                embed.set_footer(text = subreddit)\n\n                await ctx.send(embed = embed)\"\"\"\n\n    @commands.command(aliases = [\"meow\", \"kitten\", \"purr\", u\"\\U0001f431\", u\"\\U0001f408\"])\n    async def cat(self, ctx):\n        \"\"\"Outputs a random cat.\"\"\"\n\n        async with ctx.typing():\n            async with aiohttp.ClientSession() as cs:\n                async with cs.get(\"http://aws.random.cat/meow\") as r:\n                    data = await r.json()\n\n                    embed = discord.Embed(title = u\"Meow \\U0001F431\", color = ykColor)\n                    embed.set_image(url = data[\"file\"])\n                    embed.set_footer(text = \"http://random.cat/\")\n\n                    await ctx.send(embed = embed)\n\n    @commands.command(aliases = [\"bark\", \"puppy\", u\"\\U0001f436\", u\"\\U0001f415\"])\n    async def dog(self, ctx):\n        \"\"\"Outputs a random dog.\"\"\"\n\n        async with ctx.typing():\n            async with aiohttp.ClientSession() as cs:\n                async with cs.get(\"https://dog.ceo/api/breeds/image/random\") as r:\n                    data = await r.json()\n\n                    embed = discord.Embed(title = u\"Bark \\U0001F436\", color = ykColor)\n                    embed.set_image(url = data[\"message\"])\n                    embed.set_footer(text = \"https://dog.ceo/dog-api/\")\n\n                    await ctx.send(embed = embed)\n\n    @commands.command(aliases = [\"choice\"])\n    async def choose(self, ctx, *, options: commands.clean_content):\n        \"\"\"Chooses an option from a list of options.\"\"\"\n\n        options_list = ''.join(options).split(',')\n        options_list = [option.strip() for option in options_list]\n        # fOptionsList = [f\"**{option}**\" for option in options_list]\n\n        output = \"\\N{THINKING FACE} From ``{}`` I choose **{}**\".format(\n            \", \".join(options_list),\n            random.choice(options_list)\n        )\n        await ctx.send(output)\n\n    @commands.command()\n    async def shuffle(self, ctx, *, list: commands.clean_content):\n        \"\"\"Shuffles a list of things.\"\"\"\n\n        shuffled_list = ''.join(list).split(',')\n        shuffled_list = [thing.strip() for thing in shuffled_list]\n        random.shuffle(shuffled_list)\n\n        output = \"``{}`` \\N{BLACK RIGHTWARDS ARROW} ``{}``\".format(\n            list,\n            \", \".join(shuffled_list)\n        )\n        await ctx.send(output)\n\n    @commands.command()\n    async def sort(self, ctx, *, list: commands.clean_content):\n        \"\"\"Sorts a list of things in alphabetic order.\"\"\"\n\n        sorted_list = ''.join(list).split(',')\n        sorted_list = [thing.strip() for thing in sorted_list]\n        sorted_list.sort()\n\n        output = \"``{}`` \\N{BLACK RIGHTWARDS ARROW} ``{}``\".format(\n            list,\n            \", \".join(sorted_list)\n        )\n        await ctx.send(output)\n\n    @commands.command()\n    async def quote(self, ctx):\n        \"\"\"Outputs a random quote.\"\"\"\n\n        async with aiohttp.ClientSession() as cs:\n            async with cs.get(\"https://talaikis.com/api/quotes/random/\") as r:\n                data = await r.json()\n\n                embed = discord.Embed(title = data[\"author\"], description = data[\"quote\"], color = ykColor)\n                embed.set_footer(text = \"https://talaikis.com/api/\")\n\n                await ctx.send(embed = embed)\n\n    @commands.command(aliases = [\"die\", u\"\\U0001F3B2\"])\n    async def dice(self, ctx):\n        \"\"\"Rolls a dice.\"\"\"\n\n        a = random.randint(1, 6)\n        b = '!' if a == 6 else '.'\n\n        file = discord.File(f\"assets/dice/{a}.png\", filename = \"dice.png\")\n        embed = discord.Embed(title = u\"\\U0001F3B2\" + f\" You rolled a {a}{b}\", color = discord.Color.blurple())\n        embed.set_image(url = \"attachment://dice.png\")\n\n        await ctx.send(embed = embed, file = file)\n\n    @commands.command(aliases = [\"skin\"])\n    async def mcskin(self, ctx, username: str = \"Steve\"):\n        \"\"\"Gets a Minecraft skin.\"\"\"\n\n        async with ctx.typing():\n            async with aiohttp.ClientSession() as cs:\n                async with cs.get(f\"https://api.mojang.com/users/profiles/minecraft/{username}\") as r:\n                    try:\n                        data = await r.json()\n                    except:\n                        await yuki.send_error(\"Minecraft user doesn't exist!\", ctx)\n                        return\n\n                    uuid = data[\"id\"]\n                    name = data[\"name\"]\n\n                async with cs.get(f\"https://sessionserver.mojang.com/session/minecraft/profile/{uuid}\") as r:\n                    data1 = await r.json()\n\n                    value = data1[\"properties\"][0][\"value\"]\n                    skinURL = json.loads(b64decode(value))[\"textures\"][\"SKIN\"][\"url\"]\n\n            embed = discord.Embed(title = f\"{name}'s Skin\", color = ykColor)\n            embed.set_image(url = skinURL)\n\n            await ctx.send(embed = embed)\n\n    @commands.command(aliases = [\"bc\", \"bcp\", \"bitcoinprice\"])\n    async def bitcoin(self, ctx):\n        \"\"\"Outputs the current Bitcoin price.\"\"\"\n\n        bc_logo = \"https://raw.githubusercontent.com/roslinpl/bitcoin.it-promotional_graphics/master/bitcoinLogo1000.png\"\n\n        async with aiohttp.ClientSession() as cs:\n            async with cs.get(\"https://api.coindesk.com/v1/bpi/currentprice.json\") as r:\n                data = json.loads(await r.content.read())\n\n        usd = data[\"bpi\"][\"USD\"][\"rate\"]\n        gbp = data[\"bpi\"][\"GBP\"][\"rate\"]\n        eur = data[\"bpi\"][\"EUR\"][\"rate\"]\n\n        embed = discord.Embed(title = \"\", color = 0xf7931a)\n        embed.set_author(\n            name = \"Current Bitcoin Price\",\n            url = \"https://www.coindesk.com/price/\",\n            icon_url = bc_logo\n        )\n\n        embed.add_field(name = \"United States Dollar\", value = f\"$ {usd}\")\n        embed.add_field(name = \"British Pound Sterling\", value = f\"£ {gbp}\")\n        embed.add_field(name = \"Euro\", value = f\"€ {eur}\")\n        embed.set_footer(text = \"Powered by CoinDesk\")\n\n        await ctx.send(embed = embed)\n\n    @commands.command(name = \"8ball\", aliases = [\"ask\", u\"\\U0001f3b1\"])\n    async def ask(self, ctx, *, text: str):\n        \"\"\"Ask the 8-ball questions.\"\"\"\n\n        if ''.join(text).endswith('?'):\n            answer = random.choice(self.answers)\n        else:\n            answer = \"Ask me something next time\"\n\n        embed = discord.Embed(color = ykColor)\n        embed.set_author(name = \"8-ball\") # \"https://image.ibb.co/drgwj8/8ball.png\"\n        embed.set_thumbnail(url = \"https://image.ibb.co/drgwj8/8ball.png\")\n        embed.add_field(name = u\"\\U00002753 Question\", value = ''.join(text), inline = False)\n        embed.add_field(name = u\"\\U0001f3b1 Answer\", value = answer, inline = True)\n        embed.set_footer(text = \"Put a ? for it to count as a question!\")\n\n        # await ctx.send(u\"\\U0001F3B1\" + f\" The 8-ball said ``{answer}``\")\n        await ctx.send(embed = embed)\n\n    @commands.command(aliases = [\"pm\"])\n    async def dm(self, ctx, user: discord.User = None, *, text: str):\n        \"\"\"DMs text to the user.\"\"\"\n\n        # await member.send(''.join(text))\n        msg_author = ctx.author\n\n        embed = discord.Embed(\n            title = \"\",\n            description = ''.join(text),\n            color = ykColor\n        )\n        embed.set_author(\n            name = str(msg_author),\n            icon_url = msg_author.avatar_url\n        )\n        embed.set_footer(text = f\"User ID: {msg_author.id}\")\n\n        await user.send(embed = embed)\n        await ctx.message.add_reaction(u\"\\u2705\")\n        # else:\n        #     await ctx.message.add_reaction(self.bot.get_emoji(465215264439664650))\n\n    @commands.command(aliases = [\"plus\", \"\\U00002795\"])\n    async def sum(self, ctx, *numbers: float):\n        \"\"\"Adds numbers together.\"\"\"\n\n        numbers = (3, 6) if numbers == () else numbers\n\n        \"\"\"\n        nums = []\n        for num in numbers:\n            if num % 1 == 0: # If it ends with .0\n                nums.append(int(num))\n            else:\n                nums.append(num)\n        \"\"\"\n\n        # Get rid of .0\n        nums = [int(num) if num % 1 == 0 else num for num in numbers]\n        # Make every number a bold string\n        f_numbers = [f\"**{num}**\" for num in nums]\n\n        output = \"{} = __**{}**__\".format(\" + \".join(f_numbers), sum(nums))\n\n        await ctx.send(output)\n\ndef setup(bot):\n    bot.add_cog(Utilities(bot))"
  },
  {
    "path": "frontend.pyw",
    "content": "import sys\nfrom PyQt5.QtWidgets import *\nfrom PyQt5.QtGui import *\n# from PyQt5.QtCore import *\n\nimport yuki\nimport threading\nimport logging\nimport asyncio\n\nfrom functools import partial\n\nclass QTextEditLogger(logging.Handler):\n    def __init__(self, parent):\n        super().__init__()\n        self.widget = QTextEdit(parent)\n        self.widget.setReadOnly(True)\n\n    def emit(self, record):\n        colorDict = {\n            \"INFO\":    \"<font color=blue>\",\n            \"ERROR\":   \"<font color=red>\",\n            \"WARNING\": \"<font color=darkorange>\"\n        }\n        self.widget.append(\n            colorDict.get(record.levelname, \"<font color=black>\") +\n            self.format(record) +\n            \"</font>\"\n        )\n        # self.widget.append(\"</span>\")\n        app.processEvents()\n\nclass AppForm(QWidget):\n    def __init__(self):\n        super().__init__()\n\n        self.initUI()\n\n    def initUI(self):\n        self.resize(640, 480)\n        self.setWindowTitle(\"Yukiko\")\n        self.setWindowIcon(QIcon(\"assets/yukikoIcon.png\"))\n\n        self.channelTextBox = QLineEdit(self)\n        self.channelTextBox.setPlaceholderText(\"Channel ID\")\n        # self.channelTextBox.textChanged.connect(partial(await yuki.start_typing, self.channelTextBox.text()))\n        self.msgTextBox = QLineEdit(self)\n        self.msgTextBox.setPlaceholderText(\"Message Content\")\n\n        # self.applyPlayingBtn.clicked.connect(self.applyPlayingStatus)\n        self.sendMSGButton = QPushButton(\"Send Message\", self)\n\n        self.logTextBox = QTextEditLogger(self)\n\n        self.logTextBox.setFormatter(logging.Formatter(\"%(asctime)s - %(levelname)s - %(message)s\"))\n        logging.getLogger().addHandler(self.logTextBox)\n        logging.getLogger().setLevel(logging.INFO)\n\n        self.layout = QVBoxLayout()\n        self.layout.addWidget(self.logTextBox.widget)\n\n        self.layout.addWidget(self.channelTextBox)\n        self.layout.addWidget(self.msgTextBox)\n\n        self.layout.addWidget(self.sendMSGButton)\n\n        self.setLayout(self.layout)\n\n    def applyPlayingStatus(self):\n        yuki.changePlayingStatus(self.playingTextbox.text())\n\nclass RedirToLogger(object):\n    # https://www.electricmonk.nl/log/2011/08/14/redirect-stdout-and-stderr-to-a-logger-in-python/\n\n    def __init__(self, logger, log_level = logging.INFO):\n        self.logger = logger\n        self.log_level = log_level\n        self.linebuf = \"\"\n\n    def write(self, buf):\n        for line in buf.rstrip().splitlines():\n            self.logger.log(self.log_level, line.rstrip())\n\nif __name__ == \"__main__\":\n    \"\"\"stdout_logger = logging.getLogger(\"STDOUT\")\n    sl = RedirToLogger(stdout_logger, logging.INFO)\n    sys.stdout = sl\n    \"\"\"\n\n    stderr_logger = logging.getLogger(\"STDERR\")\n    sl = RedirToLogger(stderr_logger, logging.ERROR)\n    sys.stderr = sl\n\n    app = QApplication(sys.argv)\n\n    # app.setStyle(\"Fusion\")\n\n    window = AppForm()\n    t = threading.Thread(target = yuki.run_bot, name = \"Runs the bot\")\n    t.daemon = True\n    t.start()\n\n    window.show()\n\nsys.exit(app.exec_())"
  },
  {
    "path": "minigames.py",
    "content": "import numpy as np\nfrom PIL import Image, ImageDraw, ImageStat\nimport random\n\n# gameBoard = np.zeros((7, 6))\n\nclass TicTacToe:\n    def __init__(self):\n        self.board = np.zeros((3, 3))\n        self.move = 1 # 1 is X, 2 is O.\n\n    def draw(self):\n        print(self.board)\n\n    def place(self, x, y):\n        if t.check(x, y) not in (1, 2): # Checks if X or O already placed there\n            t.board[y - 1, x - 1] = self.move\n\n            return 0\n        else:\n            return 1\n    def check(self, x, y):\n        return t.board[y -1, x - 1]\n\n    def checkForWin(self):\n        if self.check(1, 1) == self.check(2, 1) == self.check(3, 1):      # Check if won on the first horizontal row\n            return self.check(1, 1)\n        elif self.check(1, 2) == self.check(2, 2) == self.check(3, 2):    # Check if won on the second horizontal row\n            return self.check(1, 2)\n        elif self.check(1, 3) == self.check(2, 3) == self.check(3, 3):    # Check if won on the third horizontal row\n            return self.check(1, 3)\n\n        elif self.check(1, 1) == self.check(1, 2) == self.check(1, 3):    # Check if won on the first vertical row\n            return self.check(1, 1)\n        elif self.check(2, 1) == self.check(2, 2) == self.check(2, 3):    # Check if won on the second vertical row\n            return self.check(2, 1)\n        elif self.check(3, 1) == self.check(3, 2) == self.check(3, 3):    # Check if won on the third vertical row\n            return self.check(3, 1)\n\n        elif self.check(1, 1) == self.check(2, 2) == self.check(3, 3):    # Check if won diagonally 1\n            return self.check(1, 1)\n        elif self.check(3, 1) == self.check(2, 2) == self.check(1, 3):    # Check if won diagonally 2\n            return self.check(1, 1)\n        else:\n            return None\n\n    def isFull(self):\n        a = 0\n        for list in self.board:\n            if 0 in list:\n                a += 1\n        if a == 0:\n            return \"tie\"\n        else:\n            return \"not full\"\n\n    def next(self):\n        win = self.checkForWin()\n        if win:\n            return win\n        elif self.isFull():\n            return self.isFull()\n\n        if self.move == 1:\n            self.move = 2\n        elif self.move == 2:\n            self.move = 1\n\n\"\"\"if __name__ == \"__main__\":\n    t = TicTacToe()\n\n    running = True\n    while running:\n        t.draw() # Draw the game board\n        a = input().split(\" \") # Gets x and y and puts it into a tuple\n        placed = t.place(int(a[0]), int(a[1])) # Returns 1 if no space there, otherwise 0\n        if placed == 1:\n            print(\"There's no space there! Try again!\")\n        else:\n            win = t.next() # Next move, and checks if someone won\n            if win in (1, 2): # If someone won\n                print(str(win), \"wins!\")\n                input()\n                running = False\n            elif win == \"tie\": # Otherwise if it was a tie...\n                print(\"It was a tie.\")\n                input()\n                running = False\"\"\"\n\nclass FloodIt:\n    def __init__(self):\n        self.colors = {\n            \"blue\":      (90, 192, 234),\n            \"orange\":    (230, 89, 50),\n            \"green\":     (156, 198, 58),\n            \"yellow\":    (250, 231, 75),\n            \"pink\":      (247, 150, 218),\n            \"dark_blue\": (34, 122, 160)\n        }\n\n        self.field = Image.new(\"RGB\", (14, 14))\n        pixels = self.field.load()\n\n        for y in range(self.field.height):\n            for x in range(self.field.width):\n                pixels[y, x] = random.choice(tuple(self.colors.values()))\n\n        self.field = self.field.resize((256, 256))\n\n    def next(self, fill):\n        ImageDraw.floodfill(self.field, (0, 0), self.colors[fill])\n        # self.field.show()\n\n    def isFull(self):\n        extrema = ImageStat.Stat(self.field)._getextrema()\n        return extrema.count(extrema[0]) == len(extrema)\n\nif __name__ == \"__main__\":\n    game = FloodIt()\n    game.isFull()"
  },
  {
    "path": "yuki.py",
    "content": "import discord\nfrom discord.ext import commands\n\nimport logging\nimport sys, traceback\n\nimport webcolors\nfrom os.path import isfile\nfrom os import listdir\nfrom configparser import RawConfigParser\n\nimport aiohttp\nimport asyncio\n\ndescription = \"\"\"A multi-purpose bot with fun commands\"\"\"\nprefix = \".yk \"\n\n\"\"\"async def get_pre(bot, msg):\n    if msg.content.startswith(prefix) and msg.guild:\n        return prefix\n    elif msg.content.startswith(prefix) and not msg.guild:\n        return prefix\n    elif not msg.guild:\n        return ''\"\"\"\n\nbot = commands.Bot(\n    command_prefix = commands.when_mentioned_or(prefix), # , u\"\\U0001f916\"),\n    description = description,\n    owner_id = 393_041_441_301_200_896\n)\nbot.remove_command(\"help\") # Removes the default help command.\ncolor = 0xFF033E\n\nfor file in listdir(\"cogs\"):\n    if file.endswith(\".py\") and not file.startswith('_'):\n        name = file[:-3]\n        try:\n            bot.load_extension(f\"cogs.{name}\")\n        except Exception as exc:\n            print(f\"Failed to load cog {name}.\", file = sys.stderr)\n            traceback.print_exc()\n\n@bot.event\nasync def on_ready():\n    logging.info(\"Logged in as\")\n    logging.info(bot.user)\n    logging.info(bot.user.id)\n    logging.info(\"------\")\n\n    await bot.change_presence(activity = discord.Game(name = f\"on {len(bot.guilds)} servers | {prefix}help\"))\n\n    global cross_mark\n    cross_mark = bot.get_emoji(465_215_264_439_664_650)\n\n@bot.event\nasync def on_guild_join(guild):\n    await bot.change_presence(activity = discord.Game(name = f\"on {len(bot.guilds)} servers | {prefix}help\"))\n\n@bot.event\nasync def on_guild_remove(guild):\n    await bot.change_presence(activity = discord.Game(name = f\"on {len(bot.guilds)} servers | {prefix}help\"))\n\n@bot.event\nasync def on_message(msg):\n    if msg.author == bot.user:\n        return\n\n    if msg.author.bot:\n        return\n\n    await bot.process_commands(msg)\n\n@bot.event\nasync def on_command_error(ctx, error):\n    if isinstance(error, commands.MissingRequiredArgument):\n        await send_error(f\"<{ error.param.name.split(':')[0] }> is a required argument!\", ctx)\n\n    elif isinstance(error, commands.NoPrivateMessage):\n        await send_error(\"Command can't be used in DM.\", ctx)\n\n    elif isinstance(error, commands.CommandNotFound):\n        await ctx.message.add_reaction(bot.get_emoji(493_196_667_336_654_858))\n\n    elif isinstance(error, commands.DisabledCommand):\n        await send_error(\"Command is disabled.\", ctx)\n\n    elif isinstance(error, commands.TooManyArguments):\n        await send_error(\"Too many arguments were passed!\", ctx)\n\n    elif isinstance(error, commands.NotOwner):\n        await send_error(\"Command may only be used by the bot owner.\", ctx)\n\n    elif isinstance(error, commands.MissingPermissions):\n        if len(error.missing_perms) == 1:\n            output = \"You are missing the permission: ``{}``\".format(\n                error.missing_perms[0].replace('_', ' ').title()\n            )\n\n            await send_error(output, ctx, icon = u\"\\U000026d4\")\n        else:\n            perms = []\n            for perm in error.missing_perms:\n                perms += f\"``{ error.missing_perms[0].replace('_', ' ').title() }``\"\n            perms = '\\n'.join(perms)\n            output = f\"You are missing the following perms: {perms}\"\n            await send_error(output, ctx, icon = u\"\\U000026d4\")\n\nasync def get_image(link, ctx):\n    if link == None: # If no link is passed\n        if len(ctx.message.attachments) >= 1:\n            # Attachment\n            used_link = ctx.message.attachments[0].url\n        else:\n            # Last Attachment\n            async for message in ctx.channel.history(limit = 10):\n                # If it has a height value it's an image\n                if len(message.attachments) >= 1 and message.attachments[-1].height:\n                    used_link = message.attachments[-1].url\n                    break\n                elif len(message.embeds) >= 1 and message.embeds[-1].image:\n                    used_link = message.embeds[-1].image.url\n                    break\n\n    elif link.startswith(\"<:\"): # (Custom) Emoji\n        id = link.split(':')[2][:-1]\n        used_link = bot.get_emoji(id).url\n        print(id, used_link)\n    else:\n        used_link = link\n\n    async with aiohttp.ClientSession() as session:  # Link\n        async with session.get(used_link) as response:\n            return await response.read()\n\nasync def send_error(error, ctx, icon = u\"\\U000026a0\"):\n    \"\"\"Sends an error message.\"\"\"\n\n    embed = discord.Embed(description = f\"{icon} **{error}**\", color = color)\n    await ctx.send(embed = embed)\n\n\nasync def start_typing(channelID):\n    cha = await bot.get_channel(id = int(channelID))\n    await cha.trigger_typing()\n\n\"\"\"def clean_text(text, ctx):\n    return re.sub(r\"\\<\\@(.*?)\\>\", Squeaky(ctx), text, flags = re)\"\"\"\n\ndef run_bot():\n    config = RawConfigParser()\n    config.read(\"config.ini\")\n    try:\n        token = config[\"Secret\"][\"bot_token\"]\n    except KeyError:\n        token = input(\"Type in your bot token: \")\n        try:\n            config[\"Secret\"]\n        except KeyError:\n            config.add_section(\"Secret\")\n        config[\"Secret\"][\"bot_token\"] = token\n        with open(\"config.ini\", \"w\") as f:\n            config.write(f)\n\n    \"\"\"\n    try:\n        mashapeKey = config[\"Secret\"][\"mashape_key\"]\n    except KeyError:\n        mashapeKey = input(\"Type in your Mashape API key (Press enter if you don't have one): \")\n        try:\n            config[\"Secret\"]\n        except KeyError:\n            config.add_section(\"Secret\")\n        config[\"Secret\"][\"bot_token\"] = token\n        with open(\"config.ini\", \"w\") as f:\n            config.write(f)\n    \"\"\"\n\n    bot.run(token, bot = True, reconnect = True)\n\nif __name__ == \"__main__\":\n    run_bot()\n"
  }
]