ESN-Trondheim / ESN-Trondheim/ESNbot

Refactor upload api call, should be a function in main.BotClient()

Open
#63 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Python
Stars
3
Forks
2
PR merge metrics
No merged PRs in 30d

Description

DRY

watermark:
https://github.com/ESN-Trondheim/ESNbot/blob/cfc0bd24ae3d89333d7ce434d639fd7794e00cbb/esnbot/commands.py#L178-L180

coverphoto:
https://github.com/ESN-Trondheim/ESNbot/blob/cfc0bd24ae3d89333d7ce434d639fd7794e00cbb/esnbot/commands.py#L253-L255

These should be a function that is a part of `main.BotClient()`.
If we want to do any changes, we will then only have to change the function itself instead of in two places.

Contributor guide

Open the contributing guide

Research direction

Start with esnbot/commands.py at the linked watermark lines 178-180 and coverphoto lines 253-255, then inspect main.BotClient(). Extract the repeated upload API call into a BotClient function and update both locations to use it. Done means upload behavior remains the same while future changes need only one implementation to update.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.