forked from EZFNDEV/EZFN-Lobbybot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MultipleClients.py
52 lines (39 loc) · 1.72 KB
/
MultipleClients.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
import fortnitepy,json,functions
from Events import ready,friends,party,message
async def LoadAccount(fnClient,Email,Password):
client = fortnitepy.Client(email=Email,password=Password,platform=fnClient.platform,default_party_member_config=fnClient.default_party_member_config,status=fnClient.status,loop=fnClient.loop)
client.Settings = fnClient.Settings
client.DefaultLang = fnClient.DefaultLang
client.mainID = fnClient.mainID
client.starting = True
client.RemovingFriends = False
fnClient.loop.create_task(client.start())
await client.wait_until_ready()
fnClient.Clients[client.user.id] = client
@client.event
async def event_ready():
await ready.Ready(client)
@client.event
async def event_friend_add(friend):
await friends.event_friend_add(client, friend)
@client.event
async def event_friend_remove(friend):
await friends.event_friend_remove(client, friend)
@client.event
async def event_friend_request(friend):
await friends.event_friend_request(client, friend)
@client.event
async def event_party_invite(invitation):
await party.event_party_invite(client, invitation)
@client.event
async def event_party_member_promote(old_leader, new_leader):
await party.event_party_member_promote(client, old_leader,new_leader)
@client.event
async def event_party_member_join(Member):
await party.event_party_member_join(client,Member)
@client.event
async def event_friend_message(Message):
await message.Command(client, Message)
@client.event
async def event_party_message(Message):
await message.Command(client, Message)