Skip to content

Commit

Permalink
v1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ICEGXG committed Jan 16, 2023
1 parent 4e9ec50 commit 9b944f8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
Binary file modified UntitledNuker.exe
Binary file not shown.
32 changes: 12 additions & 20 deletions src/UntitledNuker.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,6 @@ async def msg_delete(ctx):
print(f"{msgs['error']} Can't delete your message")


def userOrBot():
"""
Returns True if token belongs to user's account
Returns False if token belongs to bot's account
"""
if requests.get("https://discord.com/api/v8/users/@me", headers={"Authorization": f'{token}'}).status_code == 200:
return True
else:
return False


def checkVersion():
"""
Checking for new versions on GitHub
Expand Down Expand Up @@ -112,6 +101,7 @@ def checkActivity(type, text):
owners = config["owners"]
whiteListBool = config["whitelistbool"]
activity = config["activity"]
enablelogging = config["discordlogging"]
print(f"{msgs['info']} Loaded config.json")
except FileNotFoundError:
token = input(f"Paste token {msgs['input']} ")
Expand All @@ -130,30 +120,27 @@ def checkActivity(type, text):
activity = {"type": "playing",
"text": f"Untitled Nuker v{version}",
"isenabled": True}
enablelogging = False
config = {
"token": token,
"prefix": prefix,
"owners": owners,
"whitelistbool": whiteListBool,
"activity": activity
"activity": activity,
"discordlogging": enablelogging
}
with open("config.json", "w") as data:
json.dump(config, data, indent=2)
print(f"{msgs['info']} Created config.json")
# shitcode :)
if userOrBot() == True:
print(f"{msgs['info']} Untitled Nuker doesn't support self bots now, it will likely be added in next versions")
print(msgs['pressenter'])
input()
os._exit(0)


if activity["isenabled"]:
activityToBot = checkActivity(activity["type"], activity["text"])
else:
activityToBot = None


bot = commands.Bot(command_prefix=prefix, self_bot=userOrBot(),
bot = commands.Bot(command_prefix=prefix,
activity=activityToBot, intents=discord.Intents.all())
bot.remove_command("help")

Expand Down Expand Up @@ -613,8 +600,13 @@ async def reviveGuild(ctx, guildId: int = None):
Running bot
"""



try:
bot.run(token, bot=not userOrBot())
if enablelogging == False:
bot.run(token, log_handler=None)
else:
bot.run(token)
except discord.errors.LoginFailure:
print(f'{msgs["error"]} Invalid Token')
print(msgs['pressenter'])
Expand Down
Binary file modified src/requirements.txt
Binary file not shown.
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.0
1.3.1

0 comments on commit 9b944f8

Please sign in to comment.