Skip to content

Commit 94464fe

Browse files
authored
Push latest production version to Github
- Added Samoa - Added Assault mode - Upped the minimum modes to choose from 3 to 4 - This ensures with assault mode added both team captains still have at least one mode overlapping no matter what they choose
1 parent a4415cb commit 94464fe

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

app.py

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# Author: Loki
2-
# Discord: loki_101
3-
4-
51
import discord
62
import random
73
import logging
@@ -18,10 +14,11 @@
1814

1915
# Define map sets for different game modes
2016
map_sets = {
21-
"Control": ["Busan", "Ilios", "Lijang Tower", "Nepal", "Oasis", "Antarctic Peninsula"],
17+
"Control": ["Busan", "Ilios", "Lijang Tower", "Nepal", "Oasis", "Antarctic Peninsula", "Samoa"],
2218
"Escort": ["Circuit Royal", "Dorado", "Havana", "Junkertown", "Rialto", "Route 66", "Shambali Monastery", "Watchpoint Gibraltar"],
2319
"Flashpoint": ["New Junk City", "Suravasa"],
2420
"Hybrid": ["Blizzard World", "Eichenwalde", "Hollywood", "King's Row", "Midtown", "Numbani", "Paraiso"],
21+
"Assault": ["Hanamura", "Horizon Lunar Colony", "Paris", "Temple of Anubis", "Volskaya Industries"],
2522
"Push": ["Colosseo", "Esperanca", "New Queen Street"]
2623
}
2724

@@ -35,14 +32,15 @@ def __init__(self, user_id, ctx):
3532

3633
# Dropdown menu for category selection
3734
@discord.ui.select(
38-
placeholder="Select exactly 3 categories",
39-
min_values=3,
40-
max_values=3,
35+
placeholder="Select exactly 4 categories",
36+
min_values=4,
37+
max_values=4,
4138
options=[
4239
discord.SelectOption(label="Control"),
4340
discord.SelectOption(label="Escort"),
4441
discord.SelectOption(label="Flashpoint"),
4542
discord.SelectOption(label="Hybrid"),
43+
discord.SelectOption(label="Assault"),
4644
discord.SelectOption(label="Push")
4745
]
4846
)
@@ -124,7 +122,7 @@ async def map_vote(ctx, captain1: discord.User, captain2: discord.User):
124122

125123
# Create dropdown for Team Captain 1
126124
view1 = CategorySelect(captain1.id, ctx)
127-
await ctx.respond(f"{captain1.mention}, please select 3 categories.", view=view1)
125+
await ctx.respond(f"{captain1.mention}, please select 4 categories.", view=view1)
128126
await view1.wait()
129127

130128
# Team Captain 1's selection
@@ -133,7 +131,7 @@ async def map_vote(ctx, captain1: discord.User, captain2: discord.User):
133131

134132
# Create dropdown for Team Captain 2
135133
view2 = CategorySelect(captain2.id, ctx)
136-
await ctx.send(f"{captain2.mention}, please select 3 categories.", view=view2)
134+
await ctx.send(f"{captain2.mention}, please select 4 categories.", view=view2)
137135
await view2.wait()
138136

139137
# Team Captain 2's selection
@@ -203,7 +201,7 @@ async def mapvote(ctx,
203201
captain1: discord.Option(discord.SlashCommandOptionType.user, description="Team Captain 1"),
204202
captain2: discord.Option(discord.SlashCommandOptionType.user, description="Team Captain 2")):
205203

206-
required_role_id = CHANGE_ME # Staff role ID goes here, or @everyone role ID to disable
204+
required_role_id = 458833002643062804
207205
member = ctx.guild.get_member(ctx.author.id)
208206

209207
# Check if the user has the required role
@@ -218,5 +216,5 @@ async def mapvote(ctx,
218216
logging.error(f"Exception in mapvote: {e}")
219217
await ctx.send("An error occurred. Please try again.")
220218

221-
# Run the bot
219+
# Run the bot - your Discord Bot's token goes here
222220
bot.run("CHANGE_ME")

0 commit comments

Comments
 (0)