Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wfxey committed Aug 10, 2024
1 parent e77d13e commit 25b7847
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import uuid
from datetime import date

STATUS_CHANNEL_ID = 1263951082187526225

TOKEN = ""

intents = discord.Intents.default()
Expand Down Expand Up @@ -44,7 +42,7 @@ def is_admin(user_id):
"Chicago": "America/Chicago",
"Toronto": "America/Toronto",
"Mexico City": "America/Mexico_City",
"Säo Paulo": "America/Sao_Paulo",
"São Paulo": "America/Sao_Paulo",
"Moscow": "Europe/Moscow",
"Dubai": "Asia/Dubai",
"Hong Kong": "Asia/Hong_Kong",
Expand Down Expand Up @@ -79,6 +77,12 @@ async def on_ready(self):
)

await self.change_presence(status=Status.online, activity=activity)

async def on_member_join(self, member):
channel_id = 1230939254205448242
channel = self.get_channel(channel_id)
if channel:
await channel.send(f'**Welcome**, {member.mention}, to **D&I Projects**!')


client = Client()
Expand Down Expand Up @@ -124,7 +128,7 @@ async def on_submit(self, interaction: discord.Interaction):

response_message = (
'# Feedback\n\n'
f'Program : {program}.\n'
f'Program : {program}'
f'Given rating: {rating}.\n'
f'Reason: {reason}\n'
f'Feature request: {feature_request}\n\n'
Expand All @@ -136,7 +140,7 @@ async def on_submit(self, interaction: discord.Interaction):

text_message = (
'# Feedback\n\n'
f'Program : {program}.\n'
f'Program : {program}'
f'Submitted by USER-ID : {user_id}\n'
f'Submitted at: {today_date}\n'
f'Given rating: {rating}.\n'
Expand Down Expand Up @@ -305,7 +309,7 @@ async def delete_file_command(interaction: discord.Interaction, file_id: str):
else:
await interaction.response.send_message(f"No file found with ID **{file_id}**.")

@app_commands.command(name="announce", description="Sendet eine Ankündigung an einen bestimmten Kanal.")
@app_commands.command(name="announce", description="Sendet eine Ankündigung an einen bestimmten Kanal.")
async def announce(interaction: discord.Interaction, message: str):
user_id = interaction.user.id
if not is_admin(user_id):
Expand Down

0 comments on commit 25b7847

Please sign in to comment.