Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ async def on_ready():
|
|
| 49 |
event.set()
|
| 50 |
print("------")
|
| 51 |
|
| 52 |
-
|
| 53 |
async def on_member_join(member):
|
| 54 |
guild = member.guild
|
| 55 |
# Check if the channel with the specific ID exists in the guild
|
|
@@ -63,7 +63,6 @@ async def on_member_join(member):
|
|
| 63 |
print("Welcome channel not found.")
|
| 64 |
|
| 65 |
|
| 66 |
-
|
| 67 |
# running in thread
|
| 68 |
def run_bot():
|
| 69 |
if not DISCORD_TOKEN:
|
|
@@ -75,6 +74,8 @@ def run_bot():
|
|
| 75 |
|
| 76 |
threading.Thread(target=run_bot).start()
|
| 77 |
|
|
|
|
|
|
|
| 78 |
event.wait()
|
| 79 |
|
| 80 |
if not DISCORD_TOKEN:
|
|
|
|
| 49 |
event.set()
|
| 50 |
print("------")
|
| 51 |
|
| 52 |
+
|
| 53 |
async def on_member_join(member):
|
| 54 |
guild = member.guild
|
| 55 |
# Check if the channel with the specific ID exists in the guild
|
|
|
|
| 63 |
print("Welcome channel not found.")
|
| 64 |
|
| 65 |
|
|
|
|
| 66 |
# running in thread
|
| 67 |
def run_bot():
|
| 68 |
if not DISCORD_TOKEN:
|
|
|
|
| 74 |
|
| 75 |
threading.Thread(target=run_bot).start()
|
| 76 |
|
| 77 |
+
bot.add_listener(on_member_join, name="on_member_join")
|
| 78 |
+
|
| 79 |
event.wait()
|
| 80 |
|
| 81 |
if not DISCORD_TOKEN:
|