forked from SuperWaterGod/BFserver-Bot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
battlefield.py
534 lines (475 loc) · 24.3 KB
/
battlefield.py
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
import requests
import json
import opencc
import csv
import re
import time
import asyncio
import random
from PIL import Image, ImageDraw, ImageFont
from bs4 import BeautifulSoup
from XunProxy import aioRequest, PicDownload
cc = opencc.OpenCC('t2s')
async def ServerList(name):
if name == "":
name = "[LSP]"
url = "https://api.gametools.network/bf1/servers/?name=" + name + "&lang=zh-TW"
html = await aioRequest(url)
if html is not None:
data = json.loads(cc.convert(html))
if len(data['servers']) == 0:
return "未能搜索到相关服务器。"
else:
returnStr = ""
for i in range(len(data['servers'])):
returnStr = returnStr + str(data['servers'][i]['prefix']) + "\n" + "在线人数:" + str(
data['servers'][i]['serverInfo']) + "\n" + "当前地图:" + str(
data['servers'][i]['currentMap']) + "\n" + "===================" + "\n"
returnStr = returnStr + "\n"
return returnStr.replace("\n\n", "")
else:
return "查询超时,请稍后再试!"
async def PicServerList(name):
if name == "":
name = "[LSP]"
url = "https://api.gametools.network/bf1/servers/?name=" + name + "&lang=zh-TW"
bg = "./pic/server_bg" + str(random.randint(1, 4)) + ".jpg"
SavePic = "./Temp/" + str(int(time.time())) + ".jpg"
html = await aioRequest(url)
if html is not None:
titleFont = ImageFont.truetype(u"./font/DFP_sougeitai_W5-d813b437.ttf", size=70)
searchFont = ImageFont.truetype(u"./font/DFP_sougeitai_W5-d813b437.ttf", size=35)
nameFont = ImageFont.truetype(u"./font/DFP_sougeitai_W5-d813b437.ttf", size=25)
detailFont = ImageFont.truetype(u"./font/DFP_sougeitai_W5-d813b437.ttf", size=20)
im = Image.open(bg)
draw = ImageDraw.Draw(im)
draw.text((300, 40), "伺服器列表", font=titleFont)
draw.text((300, 120), "搜索内容:" + name.replace("%20", " "), font=searchFont)
data = json.loads(html)
if len(data['servers']) == 0:
draw.text((800, 500), "找不到伺服器", font=searchFont)
draw.text((795, 545), "變更篩選條件並重試", font=nameFont)
im.save(SavePic)
else:
for i in range(len(data['servers'])):
title = str(data['servers'][i]['prefix'])
queue = str(data['servers'][i]['serverInfo']) + "[" + str(data['servers'][i]['inQue']) + "]"
pic = str(data['servers'][i]['url'])
detail = str(data['servers'][i]['mode']) + " - " + str(data['servers'][i]['currentMap']) + " - 60HZ"
PicUrl = await PicDownload(pic)
im1 = Image.open(PicUrl)
im1.thumbnail((144, 84))
im.paste(im1, (250, 200 + 100 * i))
draw.text((400, 210 + 100 * i), title, font=nameFont)
draw.text((1400, 210 + 100 * i), queue, font=nameFont)
draw.text((400, 250 + 100 * i), detail, font=detailFont)
if PicUrl == "./pic/play.jpg":
png = Image.open("./pic/ping-unknown.png").convert('RGBA')
im.paste(png, (1510, 210 + 100 * i), png)
else:
png = Image.open("./pic/ping-best.png").convert('RGBA')
im.paste(png, (1510, 210 + 100 * i), png)
if i >= 7:
break
im.save(SavePic)
return SavePic
else:
return "查询超时,请稍后再试!"
async def TempStats(name):
if name is None:
return "未绑定昵称!请使用“/绑定+(空格)+[ID]”绑定昵称"
url = "https://battlefieldtracker.com/bf1/profile/pc/" + name
html = await aioRequest(url)
if html is not None:
bs = BeautifulSoup(html, "html.parser")
try:
data = bs.find(name="div", attrs={"class": "card player-general"})
rank = data.find_all(name="span", attrs={"class": "title"})
content = []
content.append(''.join(re.findall('[0-9]', rank[0].string)))
details = data.find_all(name="div", attrs={"class": "value"})
content.append(details[1].string)
content.append(details[2].string)
content.append(details[4].string)
stats = bs.find_all(name="div", attrs={"class": "stats-large"})
performance = stats[0].find_all(name="div", attrs={"class": "value"})
content.append(''.join(re.findall('[0-9.,%]', performance[2].string)))
content.append(''.join(re.findall('[0-9.,%]', performance[6].string)))
content.append(''.join(re.findall('[0-9.,%]', performance[7].string)))
general = stats[1].find_all(name="div", attrs={"class": "value"})
content.append(''.join(re.findall('[0-9.,%]', general[5].string)))
content.append(''.join(re.findall('[0-9.,%]', general[6].string)))
returnStr = "昵称:" + name + "\n等级:" + content[0] + "\nKD:" + content[1] + "\n胜率:" + content[2] + "\n游戏时间:" + content[3] + "\nSPM:" + content[4] + \
"\n场均击杀:" + content[5] + "\nKPM:" + content[6] + "\n技巧值:" + content[7] + "\n精准度:" + content[8]
except:
return "查询昵称有误!"
return returnStr
else:
return "查询超时,请稍后再试!"
async def Stats(name):
if name is None:
return "未绑定昵称!请使用“/绑定+(空格)+[ID]”绑定昵称"
url = "https://api.gametools.network/bf1/stats/?name=" + name
html = await aioRequest(url)
if html is not None:
try:
data = json.loads(html)
if 'error' not in data:
returnStr = str("头像:" + str(data['avatar'])) + \
str("\n昵称:" + str(data['userName'])) + \
str("\n等级:" + str(data['rank'])) + \
str("\nKD:" + str(data['killDeath'])) + \
str("\nSPM:" + str(data['scorePerMinute'])) + \
str("\nKPM:" + str(data['killsPerMinute'])) + \
str("\n胜率:" + str(data['winPercent'])) + \
str("\n技巧值:" + str(data['skill'])) + \
str("\n精准度:" + str(data['Accuracy'])) + \
str("\n爆头率:" + str(data['headshots'])) + \
str("\n总击杀:" + str(data['kills'])) + \
str("\n游戏局数:" + str(data['roundsPlayed'])) + \
str("\n场均击杀:" + str(format(data['kills'] / data['roundsPlayed'], '.1f')))
return returnStr
else:
return "查询昵称有误!"
except:
return await TempStats(name)
else:
return "查询超时,请稍后再试!"
async def Weapons(name):
if name is None:
return "未绑定昵称!请使用“/绑定+(空格)+[ID]”绑定昵称"
url = "https://api.gametools.network/bf1/weapons/?name=" + name + "&lang=zh-TW"
html = await aioRequest(url)
if html is not None:
data = json.loads(cc.convert(html))
if 'error' not in data:
weaponsData = data['weapons']
weaponsList = sorted(weaponsData, key=lambda student: student['kills'], reverse=True)
returnStr = ""
for i in range(6):
returnStr = returnStr + str("武器:" + str(weaponsList[i]['weaponName'])) + "\n" + str(
"击杀数:" + str(weaponsList[i]['kills'])) + "\n" + str(
"KPM:" + str(weaponsList[i]['killsPerMinute'])) + "\n" + str(
"精准度:" + str(weaponsList[i]['accuracy'])) + "\n" + str(
"爆头率:" + str(weaponsList[i]['headshots'])) + "\n"
returnStr = returnStr + "\n"
return returnStr.replace("\n\n", "")
pass
else:
return "查询昵称有误!"
else:
return "查询超时,请稍后再试!"
async def PicWeapons(name):
if name is None:
return "未绑定昵称!请使用“/绑定+(空格)+[ID]”绑定昵称"
url = "https://api.gametools.network/bf1/weapons/?name=" + name + "&lang=zh-TW"
bg = "./pic/weapons" + str(random.randint(1, 8)) + ".jpg"
SavePic = "./Temp/" + str(int(time.time())) + ".jpg"
html = await aioRequest(url)
if html is not None:
data = json.loads(html)
if 'error' not in data:
im = Image.open(bg)
draw = ImageDraw.Draw(im)
nameFont = ImageFont.truetype(u"./font/DFP_sougeitai_W5-d813b437.ttf", size=35)
titleFont = ImageFont.truetype(u"./font/Deng.ttf", size=20)
detailFont = ImageFont.truetype(u"./font/Deng.ttf", size=16)
draw.text((50, 30), name, font=nameFont)
weaponsData = data['weapons']
weaponsList = sorted(weaponsData, key=lambda student: student['kills'], reverse=True)
for i in range(5):
star = int(weaponsList[i]['kills'] / 100)
weaponsStar = "★ " + str(star)
weaponsName = str(weaponsList[i]['weaponName'])
weaponsKills = "击杀数:" + str(weaponsList[i]['kills'])
weaponsKpm = "K P M:" + str(weaponsList[i]['killsPerMinute'])
weaponsAcc = "精准度:" + str(weaponsList[i]['accuracy'])
weaponsHs = "爆头率:" + str(weaponsList[i]['headshots'])
pic = str(weaponsList[i]['image'])
PicUrl = await PicDownload(pic)
w, h = titleFont.getsize(weaponsName)
draw.text(((562 - w) / 2, 200 + 228 * i), weaponsName, font=titleFont)
if star >= 100:
draw.text((90, 95 + 228 * i), weaponsStar, font=titleFont, fill=(255, 132, 0))
png = Image.open("./pic/medium_orange.png").convert('RGBA')
im.paste(png, (180, 40 + 228 * i), png)
elif 100 > star >= 60:
draw.text((90, 95 + 228 * i), weaponsStar, font=titleFont)
png = Image.open("./pic/medium_blue.png").convert('RGBA')
im.paste(png, (180, 40 + 228 * i), png)
elif 60 > star >= 40:
draw.text((90, 95 + 228 * i), weaponsStar, font=titleFont)
png = Image.open("./pic/medium_white.png").convert('RGBA')
im.paste(png, (180, 40 + 228 * i), png)
elif star > 0:
draw.text((90, 95 + 228 * i), weaponsStar, font=titleFont)
draw.text((160, 230 + 228 * i), weaponsKills, font=detailFont)
draw.text((300, 230 + 228 * i), weaponsAcc, font=detailFont)
draw.text((160, 250 + 228 * i), weaponsKpm, font=detailFont)
draw.text((300, 250 + 228 * i), weaponsHs, font=detailFont)
png = Image.open(PicUrl).convert('RGBA')
im.paste(png, (150, 110 + 228 * i), png)
im.save(SavePic, 'JPEG', quality=100)
return SavePic
else:
return "查询昵称有误!"
else:
return "查询超时,请稍后再试!"
async def PicWeaponsKinds(id, command):
name = ""
weaponsName = ["/手榴弹", "/步枪", "/轻机枪", "/手枪", "/半自动", "/霰弹枪", "/精英兵", "/近战", "/冲锋枪", "/装备"]
weaponsKinds = ['手榴彈', '步槍', '輕機槍', '佩槍', '半自動步槍', '霰彈槍', '戰場裝備', '近戰武器', '衝鋒槍', '配備', '制式步槍']
for i in weaponsName:
name = command.replace(str(i), "")
if not name.startswith("/"):
break
if name == "":
name = FindBinding(id)
if name is None:
return "未绑定昵称!请使用“/绑定+(空格)+[ID]”绑定昵称"
url = "https://api.gametools.network/bf1/weapons/?name=" + name + "&lang=zh-TW"
bg = "./pic/weapons" + str(random.randint(1, 8)) + ".jpg"
SavePic = "./Temp/" + str(int(time.time())) + ".jpg"
html = await aioRequest(url)
if html is not None:
data = json.loads(html)
if 'error' not in data:
im = Image.open(bg)
draw = ImageDraw.Draw(im)
nameFont = ImageFont.truetype(u"./font/DFP_sougeitai_W5-d813b437.ttf", size=35)
titleFont = ImageFont.truetype(u"./font/Deng.ttf", size=20)
detailFont = ImageFont.truetype(u"./font/Deng.ttf", size=16)
weaponsData = []
newName = ""
for a in range(len(weaponsName)):
if command.startswith(weaponsName[a]):
for i in data['weapons']:
if i['type'] == weaponsKinds[a]:
weaponsData.append(i)
newName = name + " - " + weaponsKinds[a]
if command.startswith("步枪"):
for i in data['weapons']:
if i['type'] == weaponsKinds[10]:
weaponsData.append(i)
draw.text((50, 30), newName, font=nameFont)
# weaponsData = data['weapons']
weaponsList = sorted(weaponsData, key=lambda student: student['kills'], reverse=True)
for i in range(5):
star = int(weaponsList[i]['kills'] / 100)
weaponsStar = "★ " + str(star)
weaponsName = str(weaponsList[i]['weaponName'])
weaponsKills = "击杀数:" + str(weaponsList[i]['kills'])
weaponsKpm = "K P M:" + str(weaponsList[i]['killsPerMinute'])
weaponsAcc = "精准度:" + str(weaponsList[i]['accuracy'])
weaponsHs = "爆头率:" + str(weaponsList[i]['headshots'])
pic = str(weaponsList[i]['image'])
PicUrl = await PicDownload(pic)
w, h = titleFont.getsize(weaponsName)
draw.text(((562 - w) / 2, 200 + 228 * i), weaponsName, font=titleFont)
if star >= 100:
draw.text((90, 95 + 228 * i), weaponsStar, font=titleFont, fill=(255, 132, 0))
png = Image.open("./pic/medium_orange.png").convert('RGBA')
im.paste(png, (180, 40 + 228 * i), png)
elif 100 > star >= 60:
draw.text((90, 95 + 228 * i), weaponsStar, font=titleFont)
png = Image.open("./pic/medium_blue.png").convert('RGBA')
im.paste(png, (180, 40 + 228 * i), png)
elif 60 > star >= 40:
draw.text((90, 95 + 228 * i), weaponsStar, font=titleFont)
png = Image.open("./pic/medium_white.png").convert('RGBA')
im.paste(png, (180, 40 + 228 * i), png)
elif star > 0:
draw.text((90, 95 + 228 * i), weaponsStar, font=titleFont)
draw.text((160, 230 + 228 * i), weaponsKills, font=detailFont)
draw.text((300, 230 + 228 * i), weaponsAcc, font=detailFont)
draw.text((160, 250 + 228 * i), weaponsKpm, font=detailFont)
draw.text((300, 250 + 228 * i), weaponsHs, font=detailFont)
png = Image.open(PicUrl).convert('RGBA')
im.paste(png, (150, 110 + 228 * i), png)
im.save(SavePic, 'JPEG', quality=100)
return SavePic
else:
return "查询昵称有误!"
else:
return "查询超时,请稍后再试!"
async def Vehicles(name):
if name is None:
return "未绑定昵称!请使用“/绑定+(空格)+[ID]”绑定昵称"
url = "https://api.gametools.network/bf1/vehicles/?name=" + name + "&lang=zh-TW"
html = await aioRequest(url)
if html is not None:
data = json.loads(cc.convert(html))
if 'error' not in data:
vehiclesData = data['vehicles']
vehiclesList = sorted(vehiclesData, key=lambda student: student['kills'], reverse=True)
returnStr = ""
for i in range(6):
returnStr = returnStr + "载具:" + str(vehiclesList[i]['vehicleName']) + "\n" + "击杀数:" + str(
vehiclesList[i]['kills']) + "\n" + "KPM:" + str(vehiclesList[i]['killsPerMinute']) + "\n"
returnStr = returnStr + "\n"
return returnStr.replace("\n\n", "")
pass
else:
return "查询昵称有误!"
else:
return "查询超时,请稍后再试!"
async def PicVehicles(name):
if name is None:
return "未绑定昵称!请使用“/绑定+(空格)+[ID]”绑定昵称"
url = "https://api.gametools.network/bf1/vehicles/?name=" + name + "&lang=zh-TW"
bg = "./pic/vehicles" + str(random.randint(1, 8)) + ".jpg"
SavePic = "./Temp/" + str(int(time.time())) + ".jpg"
html = await aioRequest(url)
if html is not None:
data = json.loads(html)
if 'error' not in data:
im = Image.open(bg)
draw = ImageDraw.Draw(im)
nameFont = ImageFont.truetype(u"./font/DFP_sougeitai_W5-d813b437.ttf", size=35)
titleFont = ImageFont.truetype(u"./font/Deng.ttf", size=20)
detailFont = ImageFont.truetype(u"./font/Deng.ttf", size=16)
draw.text((50, 30), name, font=nameFont)
vehiclesData = data['vehicles']
vehiclesList = sorted(vehiclesData, key=lambda student: student['kills'], reverse=True)
for i in range(5):
star = int(vehiclesList[i]['kills'] / 100)
vehiclesStar = "★ " + str(star)
vehiclesName = str(vehiclesList[i]['vehicleName'])
vehiclesKills = "击杀数:" + str(vehiclesList[i]['kills'])
vehiclesKpm = "K P M:" + str(vehiclesList[i]['killsPerMinute'])
pic = str(vehiclesList[i]['image'])
PicUrl = await PicDownload(pic)
w, h = titleFont.getsize(vehiclesName)
draw.text(((562 - w) / 2, 200 + 228 * i), vehiclesName, font=titleFont)
if star >= 100:
draw.text((90, 95 + 228 * i), vehiclesStar, font=titleFont, fill=(255, 132, 0))
png = Image.open("./pic/medium_orange.png").convert('RGBA')
im.paste(png, (180, 40 + 228 * i), png)
elif 100 > star >= 60:
draw.text((90, 95 + 228 * i), vehiclesStar, font=titleFont)
png = Image.open("./pic/medium_blue.png").convert('RGBA')
im.paste(png, (180, 40 + 228 * i), png)
elif 60 > star >= 40:
draw.text((90, 95 + 228 * i), vehiclesStar, font=titleFont)
png = Image.open("./pic/medium_white.png").convert('RGBA')
im.paste(png, (180, 40 + 228 * i), png)
elif star > 0:
draw.text((90, 95 + 228 * i), vehiclesStar, font=titleFont)
draw.text((160, 230 + 228 * i), vehiclesKills, font=detailFont)
draw.text((160, 250 + 228 * i), vehiclesKpm, font=detailFont)
png = Image.open(PicUrl).convert('RGBA')
im.paste(png, (150, 110 + 228 * i), png)
im.save(SavePic, 'JPEG', quality=100)
return SavePic
else:
return "查询昵称有误!"
else:
return "查询超时,请稍后再试!"
async def Recent(name):
if name is None:
return "未绑定昵称!请使用“/绑定+(空格)+[ID]”绑定昵称"
url = "https://battlefieldtracker.com/bf1/profile/pc/" + name
html = await aioRequest(url)
if html is not None:
bs = BeautifulSoup(html, "html.parser")
try:
index = bs.find(name="div", attrs={"class": "card-body player-sessions"}).find_all(name="div", attrs={"class": "sessions"}) # 判断目录
times = 1
returnStr = ""
for i in range(len(index)):
data = index[i].find(name="div", attrs={"class": "session-stats"}).find_all(name="div", attrs={"style": "", "class": ""})
returnStr = returnStr + \
"更新日期:" + index[i].find('span')['data-livestamp'][0:10] + \
"\nSPM:" + data[0].string + \
"\nKD:" + data[1].string + \
"\nKPM:" + data[2].string + \
"\n游戏时间:" + data[5].string + \
"\n===================" + "\n"
times = times + 1
if times > 3:
break
except:
settings = json.load(open("./Settings.json", encoding='utf-8'))
return settings["Msg"]["Error"]["battletracker"]
returnStr = returnStr + "\n"
return returnStr.replace("\n\n", "")
else:
return "查询超时,请稍后再试!"
def Binding(id, name):
line = -1
idList = []
nameList = []
CorrectName = ''.join(re.findall('[a-zA-Z0-9-_]', name))
if CorrectName == "":
return "绑定失败:请勿绑定空昵称!"
print(CorrectName)
f = open('id.csv', 'r', encoding="utf-8")
read = csv.reader(f)
for index, info in enumerate(read):
if str(id) == info[0]:
line = index
idList.append(info[0])
nameList.append(CorrectName)
else:
idList.append(info[0])
nameList.append(info[1])
# print(index, info[1])
if line == -1:
idList.append(id)
nameList.append(CorrectName)
f1 = open('id.csv', 'w+', newline='', encoding="utf-8")
writer = csv.writer(f1)
csvList = []
for i in range(len(idList)):
csvList = csvList + [(idList[i], nameList[i])]
for j in csvList:
writer.writerow(j)
return "当前QQ绑定的ID为:[" + str(CorrectName) + "]"
def FindBinding(id):
f = open('id.csv', 'r')
read = csv.reader(f)
for index, info in enumerate(read):
if str(id) == info[0]:
return info[1]
async def BFservers(id, command):
if command.startswith("/服务器"):
return await PicServerList(command.replace("/服务器 ", "").replace("/服务器", "").replace(" ", "%20"))
elif command.startswith("/战绩"):
if command.replace("/战绩", "") == "":
return await Stats(FindBinding(id))
else:
return await Stats(command.replace("/战绩", "").replace(" ", ""))
elif command.startswith("/武器"):
if command.replace("/武器", "") == "":
return await PicWeapons(FindBinding(id))
else:
return await PicWeapons(command.replace("/武器", "").replace(" ", ""))
elif any([command.startswith("/手榴弹"), command.startswith("/步枪"), command.startswith("/轻机枪"), command.startswith("/手枪"),
command.startswith("/半自动"), command.startswith("/霰弹枪"), command.startswith("/精英兵"), command.startswith("/近战"),
command.startswith("/冲锋枪"), command.startswith("/装备")]):
return await PicWeaponsKinds(id, command.replace(" ", ""))
elif command.startswith("/载具"):
if command.replace("/载具", "") == "":
return await PicVehicles(FindBinding(id))
else:
return await PicVehicles(command.replace("/载具", "").replace(" ", ""))
elif command.startswith("/最近"):
if command.replace("/最近", "") == "":
return await Recent(FindBinding(id))
else:
return await Recent(command.replace("/最近", "").replace(" ", ""))
elif command.startswith("/帮助"):
return "本程序由Super水神编写,作者QQ:1341283988。\n" \
"目前支持的战地1功能为:\n" \
"“/绑定+(空格)+[ID]”\n" \
"“/服务器+(空格)+[名称]”\n" \
"“/战绩+(空格)+[ID]”\n" \
"“/武器+(空格)+[ID]”\n" \
"(现已支持查询手榴弹|步枪|轻机枪|手枪|半自动|霰弹枪|精英兵|近战|冲锋枪|装备)\n" \
"“/载具+(id)”\n" \
"“/最近+(id)”\n" \
"“/帮助”\n" \
"以上命令无需输入+和()\n" \
"由于该程序相当简陋,请温柔对待哦(●'◡'●) "
else:
pass