| 33 | self.start_discord(dir) |
| 34 | |
| 35 | def get_core(self, dir: str) -> tuple: |
| 36 | for file in os.listdir(dir): |
| 37 | if re.search(r'app-+?', file): |
| 38 | modules = dir + '\\' + file + '\\modules' |
| 39 | if not os.path.exists(modules): |
| 40 | continue |
| 41 | for file in os.listdir(modules): |
| 42 | if re.search(r'discord_desktop_core-+?', file): |
| 43 | core = modules + '\\' + file + '\\' + 'discord_desktop_core' |
| 44 | if not os.path.exists(core + '\\index.js'): |
| 45 | continue |
| 46 | |
| 47 | return core, file |
| 48 | |
| 49 | def start_discord(self, dir: str) -> None: |
| 50 | update = dir + '\\Update.exe' |