diff --git a/1.html b/1.html new file mode 100644 index 0000000000000000000000000000000000000000..75b60997955ef1ba6838bb5a70abe67f9bc58d4e --- /dev/null +++ b/1.html @@ -0,0 +1 @@ +{"servers":{"vultr-miami":{"id":"xov","ipv4":"144.202.38.187","ipv6":"2001:19f0:9003:026d:5400:04ff:fe69:e71e"},"vultr-frankfurt":{"id":"xow","ipv4":"45.76.82.193","ipv6":"2001:19f0:6c01:0986:5400:04ff:fe69:e71f"},"vultr-tokyo":{"id":"xox","ipv4":"198.13.63.88","ipv6":"2001:19f0:7001:1dec:5400:04ff:fe69:e720"}}} \ No newline at end of file diff --git a/main.py b/main.py index 4c0c135f61696bcf42c375ca5ab62aa5b105afc8..c14ae695c6e1314c61dcb3fd029bcd82d557b520 100644 --- a/main.py +++ b/main.py @@ -1 +1,56 @@ -print('欢迎来到 InsCode') \ No newline at end of file +# This example requires the 'message_content' intent. + +import discord +import requests +import json +headers={ + 'User-Agent':'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Mobile Safari/537.36' +} +url='https://api.n.m28.io/endpoint/florrio-map-1-green/findEach/' +param = { +} +response = requests.get(url=url,params=param,headers=headers) #三个参数 +print(type(response)) +ctx = response.text + +with open('1.html','w',encoding='utf-8') as df: + df.write(ctx) +print('保存成功') +intents = discord.Intents.default() +intents.message_content = True + +client = discord.Client(intents=intents) + +@client.event +async def on_ready(): + print(f'We have logged in as {client.user}') + +@client.event +async def on_message(message): + if message.author == client.user: + return + if message.content.startswith('.h'): + await message.channel.send("FLORR ULTRA FINDER BOT!\n You can use `.h` to get help!\n You can use `.s` to get all the servers!") + if message.content.startswith('.s'): + await message.channel.send("finding........\n") + st = "```" + for i in range(1, 1) : + headers={ + 'User-Agent':'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Mobile Safari/537.36' + } + url='https://api.ztrztr.top/api/u' + param = { + } + response = requests.get(url=url,params=param,headers=headers) #三个参数 + print(type(response.text)) + print(response.json()) + print(json.loads(response.text)) + print(type(response.json())) + ssss = str(i); + if i < 10 : + ssss = '0' + ssss + st = st + 'MAP' + ssss + ': | NA: ' + response.json()["servers"]["vultr-miami"]["id"] + " | EU: " + response.json()["servers"]["vultr-frankfurt"]["id"] + " | AS: " + response.json()["servers"]["vultr-tokyo"]["id"] + "\n" + st = st + "```" + await message.channel.send(st) + +client.run('MTA5OTE1MjI3MTEwOTAwNTUwMg.G2UpYf.vOzvjUFalWQci5CUPnFBHUmMtf9JZ5vZKNQXVM')