Skip to content

Commit 627df84

Browse files
committed
Added partner command and added timestamp to lock command.
1 parent 2851aa4 commit 627df84

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

main.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ async def lock(interaction: discord.Interaction, reason:str=None):
8181
# Wait for the View to stop listening for input...
8282
await view.wait()
8383
if view.value:
84-
em = discord.Embed(title="🔒 Locked!", description=f"Reason: {reason}" if reason else None, color=discord.Color.green())
84+
em = discord.Embed(title="🔒 Locked!", description=f"Reason: {reason}" if reason else None, timestamp=datetime.datetime.utcnow(), color=discord.Color.green())
8585
await interaction.followup.send(embed=em)
8686
await interaction.channel.edit(name=
8787
'[🔒] ' + interaction.channel.name,
@@ -123,6 +123,33 @@ async def unlock(interaction: discord.Interaction, thread: str=None, reason:str=
123123
color=discord.Color.green()
124124
))
125125

126+
# create the modal for partnering
127+
class PartnerModal(discord.ui.Modal, title='Partner with us!'):
128+
app_name = discord.ui.TextInput(label='App Name(s)', placeholder='Your app name(s)', style=discord.TextStyle.short, required=True)
129+
app_desc = discord.ui.TextInput(label='Long App Description(s)', placeholder='Your app description(s)', style=discord.TextStyle.long, required=False)
130+
app_link = discord.ui.TextInput(label='App Link(s)', placeholder='Your app link(s)', required=True)
131+
132+
async def on_submit(self, interaction: discord.Interaction):
133+
embed=discord.Embed(title='New Partner Application!', description=f'{interaction.user.mention} has submitted an application!', timestamp=datetime.datetime.utcnow(), color=discord.Color.green())
134+
embed.add_field(name='App Name(s)', value=self.app_name.value, inline=False)
135+
embed.add_field(name='App Description(s)', value=self.app_desc.value, inline=False)
136+
embed.add_field(name='App Link(s)', value=self.app_link.value, inline=False)
137+
await bot.get_channel(1017835578370310187).send(embed=embed)
138+
embed=discord.Embed(title='Your application has been submitted!', description='We will get back to you soon!', color=discord.Color.green())
139+
embed.add_field(name='App Name(s)', value=self.app_name.value, inline=False)
140+
embed.add_field(name='App Description(s)', value=self.app_desc.value, inline=False)
141+
embed.add_field(name='App Link(s)', value=self.app_link.value, inline=False)
142+
143+
await interaction.response.send_message(embed=embed, ephemeral=True)
144+
145+
146+
@tree.command(name='partner', description='Submit your app(s) to partner with our server')
147+
async def partner(interaction: discord.Interaction):
148+
# open the partner modal
149+
await interaction.response.send_modal(PartnerModal())
150+
151+
152+
126153

127154

128155

0 commit comments

Comments
 (0)