Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -28,33 +28,37 @@ gspread_bot = gspread.service_account(filename='service_account.json')
|
|
28 |
worksheet = gspread_bot.open("levelbot").sheet1
|
29 |
""""""
|
30 |
bot_ids = [1136614989411655780, 1166392942387265536, 1158038249835610123, 1130774761031610388, 1155489509518098565, 1155169841276260546, 1152238037355474964, 1154395078735953930]
|
31 |
-
|
32 |
-
print(guild)
|
33 |
-
lvl1 = guild.get_role(1171861537699397733)
|
34 |
-
lvl2 = guild.get_role(1171861595115245699)
|
35 |
-
lvl3 = guild.get_role(1171861626715115591)
|
36 |
-
lvl4 = guild.get_role(1171861657975259206)
|
37 |
-
lvl5 = guild.get_role(1171861686580412497)
|
38 |
-
lvl6 = guild.get_role(1171861900301172736)
|
39 |
-
lvl7 = guild.get_role(1171861936258941018)
|
40 |
-
lvl8 = guild.get_role(1171861968597024868)
|
41 |
-
lvl9 = guild.get_role(1171862009982242836)
|
42 |
-
lvl10 = guild.get_role(1164188093713223721)
|
43 |
-
lvl11 = guild.get_role(1171524944354607104)
|
44 |
-
lvl12 = guild.get_role(1171524990257082458)
|
45 |
-
lvl13 = guild.get_role(1171525021928263791)
|
46 |
-
lvl14 = guild.get_role(1171525062201966724)
|
47 |
-
lvl15 = guild.get_role(1171525098465918996)
|
48 |
-
lvls = {
|
49 |
-
1: lvl1, 2: lvl2, 3: lvl3, 4: lvl4, 5: lvl5, 6: lvl6, 7: lvl7, 8: lvl8, 9: lvl9, 10: lvl10,
|
50 |
-
11: lvl11, 12: lvl12, 13: lvl13, 14: lvl14, 15: lvl15,
|
51 |
-
}
|
52 |
""""""
|
53 |
|
54 |
@bot.event
|
55 |
async def on_ready():
|
56 |
print(f'Logged in as {bot.user.name}')
|
57 |
print(f"XP_PER_MESSAGE: {XP_PER_MESSAGE}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
|
60 |
def calculate_level(xp):
|
|
|
28 |
worksheet = gspread_bot.open("levelbot").sheet1
|
29 |
""""""
|
30 |
bot_ids = [1136614989411655780, 1166392942387265536, 1158038249835610123, 1130774761031610388, 1155489509518098565, 1155169841276260546, 1152238037355474964, 1154395078735953930]
|
31 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
""""""
|
33 |
|
34 |
@bot.event
|
35 |
async def on_ready():
|
36 |
print(f'Logged in as {bot.user.name}')
|
37 |
print(f"XP_PER_MESSAGE: {XP_PER_MESSAGE}")
|
38 |
+
guild = bot.get_guild(879548962464493619)
|
39 |
+
print(guild)
|
40 |
+
lvl1 = guild.get_role(1171861537699397733)
|
41 |
+
lvl2 = guild.get_role(1171861595115245699)
|
42 |
+
lvl3 = guild.get_role(1171861626715115591)
|
43 |
+
lvl4 = guild.get_role(1171861657975259206)
|
44 |
+
lvl5 = guild.get_role(1171861686580412497)
|
45 |
+
lvl6 = guild.get_role(1171861900301172736)
|
46 |
+
lvl7 = guild.get_role(1171861936258941018)
|
47 |
+
lvl8 = guild.get_role(1171861968597024868)
|
48 |
+
lvl9 = guild.get_role(1171862009982242836)
|
49 |
+
lvl10 = guild.get_role(1164188093713223721)
|
50 |
+
lvl11 = guild.get_role(1171524944354607104)
|
51 |
+
lvl12 = guild.get_role(1171524990257082458)
|
52 |
+
lvl13 = guild.get_role(1171525021928263791)
|
53 |
+
lvl14 = guild.get_role(1171525062201966724)
|
54 |
+
lvl15 = guild.get_role(1171525098465918996)
|
55 |
+
lvls = {
|
56 |
+
1: lvl1, 2: lvl2, 3: lvl3, 4: lvl4, 5: lvl5, 6: lvl6, 7: lvl7, 8: lvl8, 9: lvl9, 10: lvl10,
|
57 |
+
11: lvl11, 12: lvl12, 13: lvl13, 14: lvl14, 15: lvl15,
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
|
62 |
|
63 |
|
64 |
def calculate_level(xp):
|