Skip to content

Commit

Permalink
Adding tag changing for klefkis
Browse files Browse the repository at this point in the history
  • Loading branch information
greystorm101 committed Dec 30, 2024
1 parent ae3aded commit a682b46
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
13 changes: 12 additions & 1 deletion src/cogs/klefki.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
SPRITER_APPLICANT_ID=0
SPRITER_ID=0
SPRITE_APP_CHANNEL_ID=0
APPLICANT_ABANDONED_ID=0
APPLICANT_ROLE_GIVEN_ID=0

deny_reasons = {"alt": "One or more of sprites do not follow the criteria for a conventional head/body fusion. Please reapply with three sprites that meet the fusion requirements in https://discord.com/channels/302153478556352513/873571372981452830/909608552639897660",
"similar sprites": "Your sprites are **too similar**, which makes it difficult for the managers to evaluate your spriting skills! Please reapply "\
Expand Down Expand Up @@ -67,6 +69,7 @@ async def appaccept(self, ctx: Context, name: User, more_work_needed: bool = Fal

await selected_user.add_roles(spriter_role)
await selected_user.remove_roles(applicant_role)
await ctx.channel.edit(archived=False, applied_tags=[APPLICANT_ROLE_GIVEN_ID])

is_spman = "Sprite Manager" in [role.name for role in ctx.author.roles]
approver_role = "Sprite Manager" if is_spman else "Klefki"
Expand Down Expand Up @@ -107,7 +110,7 @@ async def appdeny(self, ctx: Context, name: User, reason:str, comment: str = "")
applicant_role = utils.get(ctx.guild.roles,id=SPRITER_APPLICANT_ID)

await selected_user.remove_roles(applicant_role)

await ctx.channel.edit(archived=False, applied_tags=[APPLICANT_ABANDONED_ID])

message = f"Hey {selected_user.mention}! Unfortunately, your application has been denied for the time being for the following reason: **{reason.upper()}**.\n\n"\

Expand Down Expand Up @@ -188,3 +191,11 @@ def load_env_vars(env: str):
global SPRITE_APP_CHANNEL_ID
SPRITE_APP_CHANNEL_ID = os.environ.get("DEV_SPRITE_APP_CHANNEL_ID") if is_dev else os.environ.get("SPRITE_APP_CHANNEL_ID")
SPRITE_APP_CHANNEL_ID = int(SPRITE_APP_CHANNEL_ID)

global APPLICANT_ABANDONED_ID
APPLICANT_ABANDONED_ID = os.environ.get("DEV_APPLICANT_ABANDONED_ID") if is_dev else os.environ.get("APPLICANT_ABANDONED_ID")
APPLICANT_ABANDONED_ID = int(APPLICANT_ABANDONED_ID)

global APPLICANT_ROLE_GIVEN_ID
APPLICANT_ROLE_GIVEN_ID = os.environ.get("DEV_APPLICANT_ROLE_GIVEN_ID") if is_dev else os.environ.get("APPLICANT_ROLE_GIVEN_ID")
APPLICANT_ROLE_GIVEN_ID = int(APPLICANT_ROLE_GIVEN_ID)
8 changes: 4 additions & 4 deletions src/cogs/zigzag.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,11 +566,11 @@ async def post_to_channel(channel: TextChannel, fusion:list | str, image: Attach

async def send_galpost_notification(thread: Thread, thread_owner: User, galleryPost: Message):
message = f"### Hey {thread_owner.mention}!\nA sprite manager or Zigzagoon thought this sprite looked great, so it has "\
f"been automatically posted to the gallery for you here: {galleryPost.jump_url} :ohyes: . You can expect to see "\
f"been automatically posted to the gallery for you here: {galleryPost.jump_url} <:ohyes:686653537911832661> . You can expect to see "\
f"it included in an upcoming sprite pack release. **You should not post this sprite to the gallery, or it will cause a duplicate**\n"\
f"## If you would like to remove this sprite from the gallery:\n- Ping `Zigzagoon (abandoned sprite poster)`"\
f"or a sprite manager in this thread.\n- Let them know you would like the sprite removed from the gallery."\
f"\n*Make sure to remove the “Needs Feedback” tag on your spritework posts once they’re added to the gallery* :happo: \n{galleryPost.embeds[0].image.url}"
f"\n*Make sure to remove the “Needs Feedback” tag on your spritework posts once they’re added to the gallery* <:happo:1058708428425535559> \n{galleryPost.embeds[0].image.url}"

await thread.send(content = message)

Expand All @@ -585,11 +585,11 @@ async def send_galpost_notification(thread: Thread, thread_owner: User, galleryP
async def send_noqa_notification(thread: Thread, thread_owner: User, noqaPost: Message):

message = f"### Hey {thread_owner.mention}!\nDue to inactivity, this sprite has been archived by a Zigzagoon or Sprite Manager. "\
f"After a certain amount of time, it will be made available for other spriters to edit so it can be added to the game (you will still be credited) :ohyes:\n"\
f"After a certain amount of time, it will be made available for other spriters to edit so it can be added to the game (you will still be credited) <:ohyes:686653537911832661>\n"\
f"## If you would like to remove this sprite from the archive:\n- Ping `Zigzagoon (abandoned sprite poster)`"\
f"or a sprite manager in this thread.\n- Let them know you would like the sprite removed from the archive.\n- You may "\
f"continue working on this sprite (in this thread or a new thread), or you can chose to leave it abandoned."\
f"\n*Make sure to remove the “Needs Feedback” tag on your spritework posts once you're done with your sprite* :happo: \n{noqaPost.embeds[0].image.url}"
f"\n*Make sure to remove the “Needs Feedback” tag on your spritework posts once you're done with your sprite* <:happo:1058708428425535559> \n{noqaPost.embeds[0].image.url}"

await thread.send(content = message)

Expand Down

0 comments on commit a682b46

Please sign in to comment.