Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,11 +11,20 @@ DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
|
| 11 |
intents = discord.Intents.all()
|
| 12 |
bot = commands.Bot(command_prefix='!', intents=intents)
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
@bot.event
|
| 15 |
async def on_member_join(member):
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
| 21 |
def run_bot():
|
|
|
|
| 11 |
intents = discord.Intents.all()
|
| 12 |
bot = commands.Bot(command_prefix='!', intents=intents)
|
| 13 |
|
| 14 |
+
welcome_list = []
|
| 15 |
+
|
| 16 |
+
|
| 17 |
@bot.event
|
| 18 |
async def on_member_join(member):
|
| 19 |
+
global welcome_list
|
| 20 |
+
|
| 21 |
+
welcome_list.append(member.mention)
|
| 22 |
+
|
| 23 |
+
if welcome_list.len > 4:
|
| 24 |
+
channel = bot.get_channel(1100458786826747945)
|
| 25 |
+
message = f'Welcome to the server, {welcome_list[0]} {welcome_list[1]} {welcome_list[2]} {welcome_list[3]}! :hugging_face:'
|
| 26 |
+
await channel.send(message)
|
| 27 |
+
welcome_list = []
|
| 28 |
|
| 29 |
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
| 30 |
def run_bot():
|