Skip to content
This repository was archived by the owner on Nov 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion create.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ async def on_submit(self, interaction: discord.Interaction):
default_perms[prole] = discord.PermissionOverwrite(read_messages=True, send_messages=True)
now = datetime.now().strftime("%m-%d-%Y, %H:%M:%S")
category = discord.utils.get(guild.categories, id=activeTicketsCategoryID)
tchannel = await guild.create_text_channel(name=f'{ticketType}-{author}', category=category, overwrites=default_perms, topic=f"Reason: {ticketDescription} | Created by: {author}")
tchannel = await guild.create_text_channel(name=f'{ticketType}-{author.display_name}', category=category, overwrites=default_perms, topic=f"Reason: {ticketDescription} | Created by: {author}")
embed3 = discord.Embed(description=f'Your {ticketType} ticket has been created, {tchannel.mention}. A member of our team will be with you shortly.', color=embedColor)
embed3.set_author(name=f'{author}', icon_url=f'{author.display_avatar}')
embed3.set_footer(text=f"{footerOfEmbeds} | {bot.user.id}", icon_url=f'{bot.user.display_avatar}')
Expand Down
31 changes: 29 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ async def self(interaction: discord.Interaction, reason: str = 'Unspecified'):
guild.me: discord.PermissionOverwrite(read_messages=True, send_messages=True),
prole: discord.PermissionOverwrite(read_messages=True, send_messages=True)
}
nchannel = await guild.create_text_channel(f'private-{author.name}', category=category, overwrites=overwrites, topic=f'Reason: {reason} | Created by: {author}')
nchannel = await guild.create_text_channel(f'private-{author.display_name}', category=category, overwrites=overwrites, topic=f'Reason: {reason} | Created by: {author}')
embed3 = discord.Embed(description=f'Private Ticket Channel created: {nchannel.mention}', color=embedColor)
embed3.set_author(name=f'{author}', icon_url=f'{author.display_avatar}')
embed3.set_footer(text=f"{footerOfEmbeds} | {bot.user.id}", icon_url=f'{bot.user.display_avatar}')
Expand Down Expand Up @@ -353,7 +353,7 @@ async def self(interaction:discord.Interaction):
embed6.add_field(name="**__Latency__**", value=f"❤️: {latency:.2f}ms")
botOwner = await bot.fetch_user(debugLogSendID)
embed6.add_field(name="**__Bot Owner__**", value=f"{botOwner.mention}")
embed6.add_field(name= "**__Version__**", value="`v4.3.5`")
embed6.add_field(name= "**__Version__**", value="`v4.3.6`")
embed6.add_field(name="**__Github Repository__**", value="[Click Me!](https://github.com/WebTheDev/TicketBot)")
botCreator = await bot.fetch_user(387002430602346499)
embed6.add_field(name="**__Bot Creator__**", value=f"{botCreator}")
Expand All @@ -375,6 +375,33 @@ async def self(interaction:discord.Interaction):
await web.send(embed=embed)
except discord.HTTPException:
await web.send("commands.options function fail" + str(e))
print(text)


@ticket.command(name = "python", description="A easter egg command!")
async def self(interaction:discord.Interaction):
try:
author = interaction.user
guild = interaction.guild
embed = discord.Embed(description=f"DON'T DO IT **{author.display_name}**!!", color=embedColor)
embed.set_image(url="https://media.tenor.com/j9rUo2jsSbEAAAAC/do-not-run-python-python-computer.gif")
embed.set_footer(text=f"{footerOfEmbeds} | {bot.user.id}", icon_url=f'{bot.user.avatar}')
embed.set_author(name=f'{author}', icon_url=author.avatar)
try:
await interaction.response.send_message(embed=embed, ephemeral=True)
except discord.HTTPException:
await interaction.response.send_message("https://media.tenor.com/j9rUo2jsSbEAAAAC/do-not-run-python-python-computer.gif", ephemeral=True)
except Exception as e:
message2 = await interaction.response.send_message(f'A unknown error has occurred, a copy of the error has been sent to the bot owner ❌', ephemeral=True)
activity1 = discord.Activity(type=discord.ActivityType.playing, name=f'{botStatusMessage}')
await bot.change_presence(status=discord.Status.dnd, activity=activity1)
web = bot.get_user(debugLogSendID)
text = str('''Error on line {}'''.format(sys.exc_info()[-1].tb_lineno))
embed = discord.Embed(title='commands.python function fail', description=f'{text}, {str(e)}', color=embedColor)
try:
await web.send(embed=embed)
except discord.HTTPException:
await web.send("commands.python function fail" + str(e))
print(text)


Expand Down