Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
test
Browse files
app.py
CHANGED
|
@@ -12,17 +12,31 @@ 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 len(welcome_list) > 4:
|
| 24 |
channel = bot.get_channel(1100458786826747945)
|
| 25 |
-
message = f'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
await channel.send(message)
|
| 27 |
welcome_list = []
|
| 28 |
|
|
|
|
| 12 |
bot = commands.Bot(command_prefix='!', intents=intents)
|
| 13 |
|
| 14 |
welcome_list = []
|
| 15 |
+
welcome_messages = [
|
| 16 |
+
"Welcome to the community :hugging_croissant:",
|
| 17 |
+
"Good to have you with us! :hugging: Got any cool projects you feel like sharing? :eyes:",
|
| 18 |
+
"Welcome aboard π¦ β΅",
|
| 19 |
+
"Hello friends! :wave: Where are you folks from? :globe: :hugging_earth:"
|
| 20 |
+
"Glad you're here! Welcome! π",
|
| 21 |
+
"New faces, new friends! Welcome! ππ",
|
| 22 |
+
"Happy to have you with us! :blobcatlove: How much have you played around with ML/AI? :laptop:"
|
| 23 |
+
]
|
| 24 |
+
welcome_messages_counter = 0
|
| 25 |
|
| 26 |
@bot.event
|
| 27 |
async def on_member_join(member):
|
| 28 |
global welcome_list
|
| 29 |
+
global welcome_messages_counter
|
| 30 |
+
|
| 31 |
welcome_list.append(member.mention)
|
|
|
|
| 32 |
if len(welcome_list) > 4:
|
| 33 |
channel = bot.get_channel(1100458786826747945)
|
| 34 |
+
message = f'{welcome_messages[welcome_messages_counter]}'
|
| 35 |
+
if welcome_messages_counter == 6:
|
| 36 |
+
welcome_messages_counter == -1
|
| 37 |
+
welcome_messages_counter = welcome_messages_counter + 1
|
| 38 |
+
|
| 39 |
+
#message = f'Welcome to the server, {welcome_list[0]} {welcome_list[1]} {welcome_list[2]} {welcome_list[3]}! :hugging_face:'
|
| 40 |
await channel.send(message)
|
| 41 |
welcome_list = []
|
| 42 |
|