lunarflu HF staff commited on
Commit
40b2a54
1 Parent(s): fa1b29f

Synced repo using 'sync_with_huggingface' Github Action

Browse files
Files changed (2) hide show
  1. app.py +13 -2
  2. requirements.txt +1 -1
app.py CHANGED
@@ -82,32 +82,43 @@ async def on_message(message):
82
  if current_level == 10:
83
  if lvl10 not in message.author.roles:
84
  await message.author.add_roles(lvl10)
 
85
  #await message.author.remove_roles(role)
86
 
87
  if current_level == 11:
88
  if lvl11 not in message.author.roles:
89
- await message.author.add_roles(lvl11)
 
90
  await message.author.remove_roles(lvl10)
 
91
 
92
  if current_level == 12:
93
  if lvl12 not in message.author.roles:
94
  await message.author.add_roles(lvl12)
 
95
  await message.author.remove_roles(lvl11)
 
96
 
97
  if current_level == 13:
98
  if lvl13 not in message.author.roles:
99
  await message.author.add_roles(lvl13)
 
100
  await message.author.remove_roles(lvl12)
 
101
 
102
  if current_level == 14:
103
  if lvl14 not in message.author.roles:
104
  await message.author.add_roles(lvl14)
 
105
  await message.author.remove_roles(lvl13)
 
106
 
107
  if current_level == 15:
108
  if lvl15 not in message.author.roles:
109
  await message.author.add_roles(lvl15)
 
110
  await message.author.remove_roles(lvl14)
 
111
 
112
  except Exception as e:
113
  print(f"Error: {e}")
@@ -341,4 +352,4 @@ threading.Thread(target=run_bot).start()
341
  def greet(name):
342
  return "Hello " + name + "!"
343
  demo = gr.Interface(fn=greet, inputs="text", outputs="text")
344
- demo.launch()
 
82
  if current_level == 10:
83
  if lvl10 not in message.author.roles:
84
  await message.author.add_roles(lvl10)
85
+ print(f"Gave {message.author} {lvl10}")
86
  #await message.author.remove_roles(role)
87
 
88
  if current_level == 11:
89
  if lvl11 not in message.author.roles:
90
+ await message.author.add_roles(lvl11)
91
+ print(f"Gave {message.author} {lvl11}")
92
  await message.author.remove_roles(lvl10)
93
+ print(f"Removed {lvl10} from {message.author}")
94
 
95
  if current_level == 12:
96
  if lvl12 not in message.author.roles:
97
  await message.author.add_roles(lvl12)
98
+ print(f"Gave {message.author} {lvl12}")
99
  await message.author.remove_roles(lvl11)
100
+ print(f"Removed {lvl11} from {message.author}")
101
 
102
  if current_level == 13:
103
  if lvl13 not in message.author.roles:
104
  await message.author.add_roles(lvl13)
105
+ print(f"Gave {message.author} {lvl13}")
106
  await message.author.remove_roles(lvl12)
107
+ print(f"Removed {lvl12} from {message.author}")
108
 
109
  if current_level == 14:
110
  if lvl14 not in message.author.roles:
111
  await message.author.add_roles(lvl14)
112
+ print(f"Gave {message.author} {lvl14}")
113
  await message.author.remove_roles(lvl13)
114
+ print(f"Removed {lvl13} from {message.author}")
115
 
116
  if current_level == 15:
117
  if lvl15 not in message.author.roles:
118
  await message.author.add_roles(lvl15)
119
+ print(f"Gave {message.author} {lvl15}")
120
  await message.author.remove_roles(lvl14)
121
+ print(f"Removed {lvl14} from {message.author}")
122
 
123
  except Exception as e:
124
  print(f"Error: {e}")
 
352
  def greet(name):
353
  return "Hello " + name + "!"
354
  demo = gr.Interface(fn=greet, inputs="text", outputs="text")
355
+ demo.launch()
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
  discord.py
2
- gradio
 
1
  discord.py
2
+ gradio