Last active
January 29, 2022 03:30
-
-
Save apacheli/ae63435c80f6e47f78a46588cd3d5fde to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
MS_TO_DAYS = 8.64e+7 | |
DISCORD_EPOCH = 1420070400000 | |
FIRST_RAID = 1606866300000 | |
total_bans = int(input("total bans: ")) | |
total_raids = int(input("total raids: ")) | |
first_case = int(input("first case: ")) | |
first_case_url = input("first case url: ") | |
last_case = int(input("last case: ")) | |
last_case_url = input("last case url: ") | |
reason = input("reason: ") | |
responsible_moderator = input("responsible moderator(s): ") | |
evidence = input("evidence: ") | |
first_banned_at = (int(first_case_url.split("/")[-1]) >> 22) + DISCORD_EPOCH | |
x_raider_count = last_case - first_case | |
x_total_raids = total_raids + 1 | |
x_total_bans = total_bans + x_raider_count | |
now = datetime.fromtimestamp(first_banned_at / 1000) | |
average_time_between_raids = round((round(now.timestamp() * 1000) - FIRST_RAID) / MS_TO_DAYS / x_total_raids, 2) | |
header_date = now.strftime("%Y-%m-%d %H:%M") | |
average_Bans_per_raid = round(x_total_bans / x_total_raids, 2) | |
print() | |
print("YOUR RESULT:") | |
print() | |
print(f"- **Total Bans**: {x_total_bans}") | |
print(f"- **Total Raids**: {x_total_raids}") | |
print(f"- **Average Bans Per Raid**: {average_Bans_per_raid} bans") | |
print(f"- **Average Time Between Raids**: {average_time_between_raids} days") | |
print() | |
print(f"### {header_date} | Case {total_raids}") | |
print(f"- **Raider Count**: {x_raider_count}") | |
print(f"- **First Ban**: [Here]({first_case_url})") | |
print(f"- **Last Ban**: [Here]({last_case_url})") | |
print(f"- **Reason**: {reason or 'no reason'}") | |
print(F"- **Responsible Moderator**: {responsible_moderator}") | |
print(f"- **Evidence**: {f'[Here]({evidence})' if evidence else 'N/A'}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment