'''
"EasyFly" Project by Aaditya Rengarajan
Contact Developer at aadit.xo@gmail.com
or at http://aadityarengarajan.vercel.app/

Open-Source Software. Documented for all viewers.

Aviation Discord Client with multiple features.

Open-Source Software under the Boost Software License 1.0.

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
'''

#/- custom database with list of ICAO approved aircrafts

icao_dictionary = {
'Antonov AN-124 Ruslan': 'A124' ,
'Antonov AN-140': 'A140' ,
'Antonov An-148': 'A148' ,
'Antonov An-158': 'A158' ,
'Airbus A319neo': 'A19N' ,
'Airbus A320neo': 'A20N' ,
'Aquila A 210': 'A210' ,
'Airbus A321neo': 'A21N' ,
'Antonov An-225 Mriya': 'A225' ,
'Airbus A300-600': 'A306' ,
'A300C4"': 'A30B' ,
'Airbus A310-200': 'A310' ,
'Airbus A310-300': 'A310' ,
'Airbus A318': 'A318' ,
'Boeing 777-369': 'B77W',
'Airbus A318 (sharklets)': 'A318' ,
'Airbus A319': 'A319' ,
'Airbus A319 (sharklets)': 'A319' ,
'Airbus A320': 'A320' ,
'Airbus A320 (sharklets)': 'A320' ,
'Airbus A321': 'A321' ,
'Airbus A321 (sharklets)': 'A321' ,
'Airbus A330-200': 'A332' ,
'Airbus A330-300': 'A333' ,
'"Airbus A330-700 ""Beluga XL"""': 'A337' ,
'Airbus A330-800neo': 'A338' ,
'Airbus A330-900neo': 'A339' ,
'Airbus A340-200': 'A342' ,
'Airbus A340-300': 'A343' ,
'Airbus A340-500': 'A345' ,
'Airbus A340-600': 'A346' ,
'Airbus A350-900': 'A359' ,
'Airbus A350-1000': 'A35K' ,
'Airbus A380-800': 'A380' ,
'Airbus A380-800': 'A388' ,
'"Airbus A300-600ST ""Super Transporter"" / ""Beluga"""': 'A3ST' ,
'Airbus A400M Atlas': 'A400' ,
'ICON A5': 'A5' ,
'Hawker Siddeley HS 748': 'A748' ,
'Gulfstream/Rockwell (Aero) Commander': 'AC68' ,
'Gulfstream/Rockwell (Aero) Turbo Commander': 'AC90' ,
'COMAC ARJ21': 'AJ27' ,
'Antonov AN-12': 'AN12' ,
'Antonov An-2': 'AN2' ,
'Antonov AN-24': 'AN24' ,
'Antonov AN-26': 'AN26' ,
'Antonov AN-28': 'AN28' ,
'Antonov AN-30': 'AN30' ,
'Antonov AN-32': 'AN32' ,
'Antonov AN-72 / AN-74': 'AN72' ,
'Aeroprakt A-22 Foxbat / A-22 Valor / A-22 Vision': 'AP22' ,
'Eurocopter AS332 Super Puma': 'AS32' ,
'Eurocopter AS350 Ã‰cureuil / AS355 Ecureuil 2 / AS550 Fennec': 'AS50' ,
'Aerospatiale/Alenia ATR 42-300 / 320': 'AT43' ,
'Aerospatiale/Alenia ATR 42-500': 'AT45' ,
'Aerospatiale/Alenia ATR 42-600': 'AT46' ,
'Aerospatiale/Alenia ATR 72': 'AT72' ,
'Aerospatiale/Alenia ATR 72-200 series': 'AT73' ,
'Aerospatiale/Alenia ATR 72-500': 'AT75' ,
'Aerospatiale/Alenia ATR 72-600': 'AT76' ,
'Robin ATL': 'ATL' ,
'British Aerospace ATP': 'ATP' ,
'Eurocopter (MBB) Bo.105': 'B105' ,
'Beechcraft 1900': 'B190' ,
'Bell 212': 'B212' ,
'Boeing 737 MAX 7': 'B37M' ,
'Boeing 737 MAX 8': 'B38M' ,
'Boeing 737 MAX 9': 'B39M' ,
'Boeing 737 MAX 10': 'B3XM' ,
'Bell 412': 'B412' ,
'Bell 429': 'B429' ,
'BAe 146-100': 'B461' ,
'BAe 146-200': 'B462' ,
'BAe 146-300': 'B463' ,
'Boeing 707': 'B703' ,
'Boeing 717': 'B712' ,
'Boeing 720B': 'B720' ,
'Boeing 727-100': 'B721' ,
'Boeing 727-200': 'B722' ,
'Boeing 737-200': 'B732' ,
'Boeing 737-300': 'B733' ,
'Boeing 737-400': 'B734' ,
'Boeing 737-500': 'B735' ,
'Boeing 737-600': 'B736' ,
'Boeing 737-700': 'B737' ,
'Boeing 737-800': 'B738' ,
'Boeing 737-900': 'B739' ,
'Boeing 747-100': 'B741' ,
'Boeing 747-100 Freighter': 'B741' ,
'Boeing 747-200': 'B742' ,
'Boeing 747-200M': 'B742' ,
'Boeing 747-200F': 'B742' ,
'Boeing 747-300': 'B743' ,
'Boeing 747-300M': 'B743' ,
'Boeing 747-400': 'B744' ,
'Boeing 747-400M': 'B744' ,
'Boeing 747-400F': 'B744' ,
'Boeing 747-8I': 'B748' ,
'Boeing 747-8F': 'B748' ,
'Boeing 747-400D (deprecated 2018: no longer flying)': 'B74D' ,
'Boeing 747SR': 'B74R' ,
'Boeing 747SR Freighter': 'B74R' ,
'Boeing 747SP': 'B74S' ,
'Boeing 757-200': 'B752' ,
'Boeing 757F': 'B752' ,
'Boeing 757-300': 'B753' ,
'Boeing 767-200': 'B762' ,
'Boeing 767-300': 'B763' ,
'Boeing 767-400ER': 'B764' ,
'Boeing 777-200 / Boeing 777-200ER': 'B772' ,
'Boeing 777-300': 'B773' ,
'Boeing 777-8': 'B778' ,
'Boeing 777-9': 'B779' ,
'Boeing 777-200 Freighter': 'B77L' ,
'Boeing 777-200LR': 'B77L' ,
'Boeing 777-300ER': 'B77W' ,
'Boeing 787-8': 'B788' ,
'Boeing 787-9': 'B789' ,
'Boeing 787-10': 'B78X' ,
'British Aerospace (BAC) One Eleven': 'BA11' ,
'Airbus A220-100': 'BCS1' ,
'Airbus A220-300': 'BCS3' ,
'Hawker 400': 'BE40' ,
'Beechcraft Baron / 55 Baron': 'BE55' ,
'Beechcraft Baron / 58 Baron': 'BE58' ,
'Beechcraft Model 99': 'BE99' ,
'Shorts SC-5 Belfast': 'BELF' ,
'Beriev Be-200 Altair': 'BER2' ,
' 8GCBC Scout"': 'BL8' ,
'Boeing 747 LCF Dreamlifter': 'BLCF' ,
'Pilatus Britten-Norman BN-2A/B Islander': 'BN2P' ,
'Lockheed L-182 / 282 / 382 (L-100) Hercules': 'C130' ,
'Cessna 152': 'C152' ,
'Cessna 162': 'C162' ,
'Cessna 172': 'C172' ,
'Cessna 182 Skylane': 'C182' ,
'Cessna 206 Stationair': 'C206' ,
'Cessna 208 Caravan': 'C208' ,
'Cessna 210 Centurion': 'C210' ,
'CASA / IPTN 212 Aviocar': 'C212' ,
'Cessna Citation CJ2': 'C25A' ,
'Cessna Citation CJ3': 'C25B' ,
'Cessna Citation CJ4': 'C25C' ,
'Lockheed Martin C-130J Hercules': 'C30J' ,
'Cessna 310': 'C310' ,
'Curtiss C-46 Commando': 'C46' ,
'Cessna Citation I': 'C500' ,
'Cessna Citation Mustang': 'C510' ,
'Cessna CitationJet': 'C525' ,
'Cessna Citation II': 'C550' ,
'Cessna Citation V': 'C560' ,
'Cessna Citation Excel': 'C56X' ,
' VII"': 'C650' ,
'Cessna Citation Sovereign': 'C680' ,
'Cessna 172 Cutlass RG': 'C72R' ,
'Cessna Citation X': 'C750' ,
'Cessna 177 Cardinal RG': 'C77R' ,
'COMAC C919': 'C919' ,
' 7ECA Citabria"': 'CH7A' ,
' 7KCAB Citabria"': 'CH7B' ,
'Bombardier 415': 'CL2T' ,
'Bombardier BD-100 Challenger 300': 'CL30' ,
'Canadair Challenger': 'CL60' ,
'CASA/IPTN CN-235': 'CN35' ,
'Concorde (deprecated: no longer flying)': 'CONC' ,
'Lockheed L-1049 Super Constellation': 'CONI' ,
'Canadair Regional Jet 100': 'CRJ1' ,
'Canadair Regional Jet 200': 'CRJ2' ,
'Canadair Regional Jet 700 | Regional Jet 550': 'CRJ7' ,
'Canadair Regional Jet 900': 'CRJ9' ,
'Canadair Regional Jet 1000': 'CRJX' ,
'Convair CV-240 & -440': 'CVLP' ,
' Convair CV-640"': 'CVLT' ,
'Fairchild Dornier Do.228': 'D228' ,
'Fairchild Dornier Do.328': 'D328' ,
'Diamond DA42': 'DA42' ,
'Diamond DA62': 'DA62' ,
'Douglas DC-10-10 / -15 Passenger': 'DC10' ,
'Douglas DC-10-30 / -40 Passenger': 'DC10' ,
'Douglas DC-10-30 Combi': 'DC10' ,
'Douglas DC-10-10 Freighter': 'DC10' ,
'Douglas DC-10-30 / -40 Freighter': 'DC10' ,
'Douglas DC-3': 'DC3' ,
'Douglas DC-6': 'DC6' ,
'Douglas DC-8-50': 'DC85' ,
'Douglas DC-8-62': 'DC86' ,
'Douglas DC-8-72': 'DC87' ,
'Douglas DC-9-10': 'DC91' ,
'Douglas DC-9-20': 'DC92' ,
'Douglas DC-9-30': 'DC93' ,
'Douglas DC-9-40': 'DC94' ,
'Douglas DC-9-50': 'DC95' ,
'De Havilland Canada DHC-2 Turbo-Beaver': 'DH2T' ,
'De Havilland Comet 2 (deprecated code)': 'DH62' ,
'De Havilland Comet 4 (deprecated code)': 'DH64' ,
'De Havilland Canada DHC-8-100 Dash 8 / 8Q': 'DH8A' ,
'De Havilland Canada DHC-8-200 Dash 8 / 8Q': 'DH8B' ,
'De Havilland Canada DHC-8-300 Dash 8 / 8Q': 'DH8C' ,
'De Havilland Canada DHC-8-400 Dash 8Q': 'DH8D' ,
'De Havilland Canada DHC-2 Beaver': 'DHC2' ,
'De Havilland Canada DHC-3 Otter': 'DHC3' ,
'De Havilland Canada DHC-4 Caribou': 'DHC4' ,
'De Havilland Canada DHC-5 Buffalo': 'DHC5' ,
'De Havilland Canada DHC-6 Twin Otter': 'DHC6' ,
'De Havilland Canada DHC-7 Dash 7': 'DHC7' ,
'De Havilland DH.104 Dove': 'DOVE' ,
'Embraer EMB 110 Bandeirante': 'E110' ,
'Embraer EMB 120 Brasilia': 'E120' ,
'Embraer RJ135': 'E135' ,
'Embraer RJ140': 'E135' ,
'Embraer RJ145': 'E145' ,
'Embraer 170': 'E170' ,
'Embraer 190 / Lineage 1000': 'E190' ,
'Embraer 195': 'E195' ,
'Embraer E190-E2': 'E290' ,
'Embraer E195-E2': 'E295' ,
'Embraer Legacy 600 / Legacy 650': 'E35L' ,
'Embraer Phenom 100': 'E50P' ,
'Embraer Legacy 450 / Praetor 500': 'E545' ,
'Embraer Legacy 500 / Praetor 600': 'E550' ,
'Embraer Phenom 300': 'E55P' ,
'Embraer 175 (long wing)': 'E75L' ,
'Embraer 175 (short wing)': 'E75S' ,
'Airbus A300 (deprecated 1997: code replaced)': 'EA30' ,
'Airbus A310 (deprecated 1997: code replaced)': 'EA31' ,
'Airbus A320 (deprecated 1997: code replaced)': 'EA32' ,
'Airbus A330 (deprecated 1997: code replaced)': 'EA33' ,
'Airbus A340 (deprecated 1997: code replaced)': 'EA34' ,
'Eurocopter EC120 Colibri / Harbin HC120': 'EC20' ,
'Eurocopter EC225 Super Puma': 'EC25' ,
'Eurocopter EC135 / EC635': 'EC35' ,
'Eurocopter EC145': 'EC45' ,
'Tecnam P92 Echo / P92 Eaglet / P92 SeaSky': 'ECHO' ,
'EV-97 EuroStar / EV-97 Harmony': 'EV97' ,
'Evektor SportStar': 'EVSS' ,
'MD Helicopters MD900 Explorer': 'EXPL' ,
'Fokker 100': 'F100' ,
'Fokker F27 Friendship': 'F27' ,
'Fokker F28 Fellowship': 'F28' ,
'Dassault Falcon 2000': 'F2TH' ,
'Reims-Cessna F406 Caravan II': 'F406' ,
'Fokker 50': 'F50' ,
'Fokker 70': 'F70' ,
'Dassault Falcon 900': 'F900' ,
'Dassault Falcon 50': 'FA50' ,
'Dassault Falcon 7X': 'FA7X' ,
'Gulfstream Aerospace G-159 Gulfstream I': 'G159' ,
'Grumman G-21 Goose': 'G21' ,
'Gulfstream G280': 'G280' ,
'Grumman G-73 Turbo Mallard': 'G73T' ,
'GippsAero GA8 Airvan': 'GA8' ,
'Bombardier BD-700 Global 5000': 'GL5T' ,
'Bombardier Global Express / Raytheon Sentinel': 'GLEX' ,
'Gulfstream IV': 'GLF4' ,
'Gulfstream V': 'GLF5' ,
'Gulfstream G650': 'GLF6' ,
'Tecnam P96': 'GOLF' ,
'British Aerospace 125 series / Hawker/Raytheon 700/800/800XP/850/900': 'H25B' ,
'British Aerospace 125-1000 series / Hawker/Raytheon 1000': 'H25C' ,
'Honda HA-420': 'HDJT' ,
'De Havilland DH.114 Heron': 'HERN' ,
'Ilyushin IL114': 'I114' ,
'Ilyushin IL18': 'IL18' ,
'Ilyushin IL62': 'IL62' ,
'Ilyushin IL76': 'IL76' ,
'Ilyushin IL86': 'IL86' ,
'Ilyushin IL96': 'IL96' ,
'Fairchild Dornier 328JET': 'J328' ,
'British Aerospace Jetstream 31': 'JS31' ,
'British Aerospace Jetstream 32': 'JS32' ,
'British Aerospace Jetstream 41': 'JS41' ,
'Junkers Ju 52/3M': 'JU52' ,
'Lockheed L-1011 Tristar': 'L101' ,
'Lockheed L-188 Electra': 'L188' ,
'LET 410': 'L410' ,
'Learjet 35 / 36 / C-21A': 'LJ35' ,
'Learjet 60': 'LJ60' ,
'McDonnell Douglas MD-11': 'MD11' ,
'McDonnell Douglas MD-11F': 'MD11' ,
'McDonnell Douglas MD-11C': 'MD11' ,
'McDonnell Douglas MD-81': 'MD81' ,
'McDonnell Douglas MD-82': 'MD82' ,
'McDonnell Douglas MD-83': 'MD83' ,
'McDonnell Douglas MD-87': 'MD87' ,
'McDonnell Douglas MD-88': 'MD88' ,
'McDonnell Douglas MD-90': 'MD90' ,
'Mil Mi-24 / Mi-25 / Mi-35': 'MI24' ,
'MIL Mi-8 / Mi-17 / Mi-171 / Mil-172': 'MI8' ,
'Mitsubishi Mu-2': 'MU2' ,
'Aerospatiale (Nord) 262': 'N262' ,
'Government Aircraft Factories N22B / N24A Nomad': 'NOMA' ,
'Tecnam P2006T': 'P06T' ,
'Piaggio P.180 Avanti': 'P180' ,
'Tecnam P2008': 'P208' ,
'Tecnam P2012 Traveller': 'P212' ,
'Piper PA-28 (up to 180Â\xa0hp)': 'P28A' ,
'Piper PA-28 (above 200Â\xa0hp)': 'P28B' ,
'Partenavia P.68': 'P68' ,
'Piper PA-31 Navajo': 'PA31' ,
'Piper PA-44 Seminole': 'PA44' ,
'Piper PA-46': 'PA46' ,
'Pilatus PC-12': 'PC12' ,
'Pilatus PC-6 Turbo Porter': 'PC6T' ,
'Pipistrel Sinus[4]': 'PISI' ,
'Pipistrel Taurus[4]': 'PITA' ,
'Pipistrel Virus[4]': 'PIVI' ,
' Alpha160A"': 'R200' ,
'Avro RJ100': 'RJ1H' ,
'Avro RJ70': 'RJ70' ,
'Avro RJ85': 'RJ85' ,
'Aerospatiale (Sud Aviation) Se.210 Caravelle': 'S210' ,
'Sikorsky S-58T': 'S58T' ,
'Aerospatiale SN.601 Corvette': 'S601' ,
'Sikorsky S-61': 'S61' ,
'Eurocopter (Aerospatiale) SA365C / SA365N Dauphin 2': 'S65C' ,
'Sikorsky S-76': 'S76' ,
'Sikorsky S-92': 'S92' ,
'Saab 2000': 'SB20' ,
'Shorts SC-7 Skyvan': 'SC7' ,
'Saab SF340A/B': 'SF34' ,
'Cirrus SF50 Vision Jet': 'SF50' ,
'Shorts SD.330': 'SH33' ,
'Shorts SD.360': 'SH36' ,
'Tecnam P2002 Sierra': 'SIRA' ,
'Sukhoi Superjet 100-95': 'SU95' ,
'Tupolev Tu-134': 'T134' ,
'Tupolev Tu-144': 'T144' ,
'Tupolev Tu-154': 'T154' ,
'Tupolev Tu-204 / Tu-214': 'T204' ,
'Socata TB-20 Trinidad': 'TB20' ,
'TL Ultralight TL-96 Star / TL-2000 Sting': 'TL20' ,
'Team Rocket F1': 'TRF1' ,
'Pilatus Britten-Norman BN-2A Mk III Trislander': 'TRIS' ,
'Tecnam P2010': 'TWEN' ,
'Israel Aircraft Industries 1124 Westwind': 'WW24' ,
'Harbin Yunshuji Y12': 'Y12' ,
'Yakovlev Yak-40': 'YK40' ,
'Yakovlev Yak-42': 'YK42' ,
'NAMC YS-11': 'YS11' ,
}

def check(acft):
	if acft in list(icao_dictionary.values()):
		return True
	else:
		return False

def get_name(code):
	for key,value in icao_dictionary.items():
		if value==code:
			return key