-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.py
More file actions
26 lines (23 loc) · 1.68 KB
/
utils.py
File metadata and controls
26 lines (23 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import aiohttp
async def requestJSON(link, type='get'):
async with aiohttp.ClientSession() as session:
if type.lower() == 'get':
async with session.get(link) as response:
return await response.json()
elif type.lower() == "post":
async with session.post(link) as response:
return await response.json()
else:
return -1
def splash():
print("""
██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗ ██████╗ ████████╗
██╔══██╗██╔═══██╗██╔════╝ ██║ ██║██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝
██████╔╝██║ ██║██║ ███╗██║ ██║█████╗ ██████╔╝██║ ██║ ██║
██╔══██╗██║ ██║██║ ██║██║ ██║██╔══╝ ██╔══██╗██║ ██║ ██║
██║ ██║╚██████╔╝╚██████╔╝╚██████╔╝███████╗██████╔╝╚██████╔╝ ██║
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝
""")
def getConfig():
file = open("bot_config.txt", 'r')
return file.readlines()