-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
27 lines (23 loc) · 774 Bytes
/
main.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
"""
this script gets the accountts prefered language (language u created the account with) and u can translate with this bot
this could be useful for people who make public bots and it can be used for a better user interface
"""
import fortnitepy
import os
from translate import Translator
os.system('cls||clear')
client = fortnitepy.Client(
auth=fortnitepy.AuthorizationCodeAuth(
code=input('Enter authorization code: ')
)
)
@client.event
async def event_ready():
while True:
os.system('cls||clear')
i = input("What Would You Like To Translate: ")
translator= Translator(to_lang=client.user.preferred_language)
translation = translator.translate(i)
print(f"Output: {translation}")
input('\nPress Enter To Go Again')
client.run()