You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/cogs/tickets_cog.py
+14-26Lines changed: 14 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -20,21 +20,19 @@
20
20
IDs.serverRoles.CONTRIBUTOR
21
21
]
22
22
23
-
TICKETS_CATEGORY_NAME="Tickets"
24
23
TICKET_TYPES= [
25
24
# label | description | abbreviation
26
25
("In-game report", "Hackers and chat reports", "ing-rep"),
27
26
("Discord report", "Discord issues/report a member", "dis-rep"),
28
27
("Role related", "Applications/promotion about roles", "rol"),
29
-
("Admin report", "Report an admin's behavior", "admin"),
30
28
("Other", "Other inquiries or problems", "other")
31
29
]
32
30
33
31
OPEN_TICKET_TITLE="🎟️ Need help ? Open a Ticket"
34
32
OPEN_TICKET_MSG="""
35
33
Simply click on the type of ticket you want to open **in the selector below**, and fill up the information needed (send your images and video after creating the ticket).\n
36
34
It will create a private channel between you and **the moderation team**. This way, you can make a report, request a role, or anything else.\n
37
-
**Only create a ticket if absolutely necessary!** If you need urgent assistance, please ping or send a DM to an administrator. Before creating a ticket, check if the answer to your question is not in the server FAQs (e.g., the requirements for roles are indicated there)! To report a game bug, you can use the channel https://discord.com/channels/603655329120518223/1076163933213311067!
35
+
**Only create a ticket if absolutely necessary!** If you need urgent assistance, please ping or send a DM to an admin. Before creating a ticket, check if the answer to your question is not in the server FAQs (e.g., the requirements for roles are indicated there)! To report a game bug, you can use https://discord.com/channels/603655329120518223/1076163933213311067!
embed.title="I couldn't find any videos to display on the game's homepage 🫤..."
116
+
embed.description=f"Become a <@&{IDs.serverRoles.YOUTUBER}> by meeting [these conditions](https://discord.com/channels/603655329120518223/733177088961544202/1389263121591570496), and post your first videos! 🚀"
117
+
embed.timestamp=None
118
+
# one or more videos found to send
119
+
else:
120
+
winner: discord.Message=None
121
+
# only one winning video
122
+
iflen(messages) ==1:
123
+
winner=messages[0]
124
+
embed.add_field(
125
+
name="Watch it now!",
126
+
value=f"🎬 [Click here to watch the video]({winner.jump_url}), by {winner.author.mention}!",
127
+
inline=False
128
+
)
129
+
embed.set_footer(text=nl(FEATURED_VIDEO_MSG))
130
+
# case of equality
131
+
else:
132
+
embed.title="👏 Bravo! Several videos are tied!"
133
+
embed.description=f"The following videos come in first with {vote_count} votes each!"
111
134
112
-
match=re.search(YOUTUBE_REGEX, msg.content)
135
+
foridx, minenumerate(messages, 1):
136
+
embed.add_field(name="", value=f"{idx}. [Video]({m.jump_url}) of {m.author.mention}", inline=False)
137
+
138
+
winner=random.choice(messages)
139
+
embed.add_field(name="The winner drawn at random is", value=f"This [video]({winner.jump_url}) of {winner.author.mention}!", inline=True)
embed.add_field(name="Website state", value=f"{awaitself.bot.fetch_application_emoji(IDs.customEmojis.CONNECTE)} Video sent to [repuls.io]({Links.REPULS_GAME})!")
116
-
else:
117
-
embed.add_field(name="Website state", value=f"{DefaultEmojis.WARN} Video failed to send to repuls.io ({code} error)!")
118
143
119
-
awaitvideo_channel.send(embed=embed)
120
-
else:
121
-
awaitvideo_channel.send(f"""
122
-
I couldn't find any videos to display on the game's homepage 🫤...
123
-
**Become a <@&{IDs.serverRoles.YOUTUBER}> by meeting [the following requirements](https://discord.com/channels/603655329120518223/733177088961544202/1389263121591570496), and post your first videos!** 🚀""")
0 commit comments