Skip to content

Commit

Permalink
Revert "chore: i've added something to clear console just to make t…
Browse files Browse the repository at this point in the history
…hings more easier to read in my opinion."

This reverts commit c4bbac6.
  • Loading branch information
greeeen-dev committed Sep 16, 2024
1 parent c4bbac6 commit 4429c94
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 156 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
TOKEN=
TOKEN=your_token_here
13 changes: 1 addition & 12 deletions boot/bootloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

reinstall = '--reinstall' in sys.argv

def clear():
if os.name == 'nt':
os.system('cls')
else:
os.system('clear')

install_options = [
{
'id': 'optimized',
Expand Down Expand Up @@ -74,16 +68,13 @@ def clear():
file
)
else:
clear()
# this installation is fresh
if not reinstall:
print('\x1b[33;1mInstallation not detected, running installer...\x1b[0m')
time.sleep(2)

if len(install_options) == 1:
install_option = install_options[0]['id']
else:
clear()
print(f'\x1b[33;1mYou have {len(install_options)} install options available.\x1b[0m\n')

for index in range(len(install_options)):
Expand All @@ -104,8 +95,6 @@ def clear():

install_option = install_options[install_option]['id']

clear()

print('\x1b[33;1mPlease review the following before continuing:\x1b[0m')
print(f'- Product to install: {internal["product_name"]}')
print(f'- Installation option: {install_option}')
Expand All @@ -128,7 +117,7 @@ def clear():
sys.exit(exit_code)

exit_code = os.system(f'{binary} boot/installer.py {install_option}{options}')
clear()

if not exit_code == 0:
print('\x1b[31;1mInstaller has crashed or has been aborted.\x1b[0m')
sys.exit(exit_code)
Expand Down
12 changes: 3 additions & 9 deletions boot/dep_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
import os
import sys

def clear():
if os.name == 'nt':
os.system('cls')
else:
os.system('clear')

install_option = sys.argv[1] if len(sys.argv) > 1 else None

install_options = [
Expand Down Expand Up @@ -52,7 +46,7 @@ def clear():
pass

binary = boot_config['bootloader'].get('binary', 'py -3' if sys.platform == 'win32' else 'python3')
clear()

print('\x1b[36;1mInstalling dependencies, this may take a while...\x1b[0m')

if prefix:
Expand All @@ -61,8 +55,8 @@ def clear():
code = os.system(f'{binary} -m pip install --user -U -r requirements.txt')

if not code == 0:
print('\x1b[31;1mCould not install dependencies due to a error.\x1b[0m')
print('\x1b[31;1mCould not install dependencies.\x1b[0m')
sys.exit(code)
clear()

print('\x1b[36;1mDependencies successfully installed.\x1b[0m')
sys.exit(0)
15 changes: 4 additions & 11 deletions boot/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,8 @@
import tomli
import tomli_w
import traceback
import os
from nextcord.ext import commands

def clear():
if os.name == 'nt':
os.system('cls')
else:
os.system('clear')

install_option = sys.argv[1] if len(sys.argv) > 1 else None

install_options = [
Expand Down Expand Up @@ -60,14 +53,14 @@ def clear():
@bot.event
async def on_ready():
global server_id
clear()

print(f'\x1b[33;1mIs {bot.user.name} ({bot.user.id}) the correct bot? (y/n)\x1b[0m')
answer = input().lower()

if not answer == 'y':
print(f'\x1b[31;1mAborting.\x1b[0m')
sys.exit(1)
clear()

print(f'\x1b[36;1mAttempting to DM user {user_id}...\x1b[0m')

user = bot.get_user(user_id)
Expand Down Expand Up @@ -116,7 +109,7 @@ async def on_ready():

print('\x1b[36;1mOwner verified successfully, closing bot.\x1b[0m')
await bot.close()
clear()

print('\x1b[33;1mWe need the ID of the user who will be the instance owner. In most cases this is your user ID.\x1b[0m')
print(f'\x1b[33;1mThe owner will have access to special commands for maintaining your {internal["product_name"]} instance.\x1b[0m')
print('\x1b[33;1mTo copy your ID, go to your Discord settings, then Advanced, then enable Developer mode.\x1b[0m')
Expand All @@ -130,7 +123,7 @@ async def on_ready():
sys.exit(1)
except:
print('\x1b[31;49mThis isn\'t an integer, try again.\x1b[0m')
clear()

print('\x1b[33;1mWe will now ask for your bot token.\x1b[0m')
print('\x1b[33;1mThe user verifier will use this token to log on to Discord.\x1b[0m\n')
print(f'\x1b[37;41;1mWARNING: DO NOT SHARE THIS TOKEN, NOT EVEN WITH {internal["maintainer"].upper()}.\x1b[0m')
Expand Down
16 changes: 8 additions & 8 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Unifier config TOML

[system]
debug = false
package = "unifier"
language = "english"
skip_status_check = false

[roles]
owner = 730375236197023785
owner = -1
admin_ids = []

[roles.owner_external]
# For each platform, you can add your account's ID here.
revolt = ""
guilded = ""

Expand Down Expand Up @@ -36,16 +39,13 @@ enable_reporting = false
enable_rtt = true
logging_edit = false
logging_delete = false
home_guild = 1257928675039510548
home_guild = -1
logs_channel = -1
reports_channel = -1
moderator_role = -1

[bridge]
external = [
"revolt",
"guilded",
]
external = ["revolt", "guilded"]
use_multicore = true
allow_posts = false
enable_exp = false
Expand All @@ -57,9 +57,9 @@ enable_safety_alerts = false
safe_filetypes = true
suppress_filesize_warning = false
permanent_invites = false
enable_private_rooms = false
enable_private_rooms = false # WARNING: Private Rooms are experimental, privacy is not guaranteed. Use at your own risk.
private_rooms_limit = 0
main_room = "main"
alerts_room = "alerts"
posts_room = "posts"
posts_ref_room = "post-comments"
posts_ref_room = "post-comments"
130 changes: 15 additions & 115 deletions emojis/base.json
Original file line number Diff line number Diff line change
@@ -1,119 +1,19 @@
{
"installed": true,
"installed": false,
"emojis": {
"back": [
"\u2b05\ufe0f",
0
],
"prev": [
"\u25c0\ufe0f",
0
],
"next": [
"\u25b6\ufe0f",
0
],
"first": [
"\u23ee\ufe0f",
0
],
"last": [
"\u23ed\ufe0f",
0
],
"search": [
"\ud83d\udd0d",
0
],
"command": [
"\u2328\ufe0f",
0
],
"install": [
"\ud83d\udce6",
0
],
"success": [
"\u2705",
0
],
"warning": [
"\u26a0\ufe0f",
0
],
"error": [
"\u274c",
0
],
"rooms": [
"\ud83d\udcac",
0
],
"emoji": [
"\ud83d\ude02",
0
],
"leaderboard": [
"\ud83c\udfc6",
0
]
},
"emojis_pre": {
"back": [
"\u2b05\ufe0f",
0
],
"prev": [
"\u25c0\ufe0f",
0
],
"next": [
"\u25b6\ufe0f",
0
],
"first": [
"\u23ee\ufe0f",
0
],
"last": [
"\u23ed\ufe0f",
0
],
"search": [
"\ud83d\udd0d",
0
],
"command": [
"\u2328\ufe0f",
0
],
"install": [
"\ud83d\udce6",
0
],
"success": [
"\u2705",
0
],
"warning": [
"\u26a0\ufe0f",
0
],
"error": [
"\u274c",
0
],
"rooms": [
"\ud83d\udcac",
0
],
"emoji": [
"\ud83d\ude02",
0
],
"leaderboard": [
"\ud83c\udfc6",
0
]
"back": [":arrow_left:",0],
"prev": [":arrow_backward:",0],
"next": [":arrow_forward:",0],
"first": [":track_previous:",0],
"last": [":track_next:",0],
"search": [":mag:",0],
"command": [":keyboard:",0],
"install": [":package:",0],
"success": [":white_check_mark:",0],
"warning": [":warning:",0],
"error": [":x:",0],
"rooms": [":speech_balloon:",0],
"emoji": [":joy:",0],
"leaderboard": [":trophy:",0]
}
}
Empty file modified run.sh
100755 → 100644
Empty file.

0 comments on commit 4429c94

Please sign in to comment.